This is a JavaScript implementation of the MobilePASS token client.
npm install mobilepasspnpm add mobilepassbun add mobilepassimport { generateOtp } from "mobilepass";
const actcode = "XUU75-RROTT-Y5IP6-U3BMV";
const counter = 1;
const otp = await generateOtp(actcode, counter);
console.log(`OTP: ${otp}`);const { generateOtp } = require("mobilepass");
const actcode = "XUU75-RROTT-Y5IP6-U3BMV";
const counter = 1;
(async () => {
const otp = await generateOtp(actcode, counter);
console.log(`OTP: ${otp}`);
})();- Node.js 15.0.0 and later
- Any other JavaScript environment that supports WebCrypto API