0.1.6 • Published 2 years ago
otp-jslib v0.1.6
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@example.com";
const ttl = 300; // seconds
const otp = totp(secret, otpLength, id, ttl);
console.log(otp);