npm.io
0.0.1 • Published 2 years ago

mobilepass

Licence
Apache-2.0
Version
0.0.1
Deps
1
Size
61 kB
Vulns
0
Weekly
0
Stars
1

mobilepass-js

This is a JavaScript implementation of the MobilePASS token client.

Usage

install

npm install mobilepass
pnpm add mobilepass
bun add mobilepass
code (ESModule)
import { generateOtp } from "mobilepass";

const actcode = "XUU75-RROTT-Y5IP6-U3BMV";
const counter = 1;

const otp = await generateOtp(actcode, counter);
console.log(`OTP: ${otp}`);
code (CommonJS)
const { generateOtp } = require("mobilepass");

const actcode = "XUU75-RROTT-Y5IP6-U3BMV";
const counter = 1;

(async () => {
  const otp = await generateOtp(actcode, counter);

  console.log(`OTP: ${otp}`);
})();
Compatibility
  • Node.js 15.0.0 and later
  • Any other JavaScript environment that supports WebCrypto API