otp-jslib
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i otp-jslib

Weekly Downloads

1

Version

0.1.6

License

MIT

Unpacked Size

5.49 kB

Total Files

13

Last publish

Collaborators

  • donriddo