otp-jslib
v0.1.6
Published
JavaScript library for generating OTP
Downloads
7
Readme
JavaScript library for generating OTP
How to use
yarn add otp-jslib
import { totp } from "otp-jslib";
const secret = "secret";
const otpLength = 6;
const id = "[email protected]";
const ttl = 300; // seconds
const otp = totp(secret, otpLength, id, ttl);
console.log(otp);