0.2.1 • Published 1 year ago

@jobscale/totp v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

totp

Installation

npm i @jobscale/totp

Examples

const { TOTP } = require('@jobscale/totp);

const logger = console;
const totp = new TOTP();

const value = 'JSXJPX6EY4BMPXIRSSR74';

const main = async () => {
  const code = await totp.auth({
    secret: value,
  });
  const res = await totp.verify({
    code,
    secret: value,
    window: 1,
  });
  logger.info({ res });
};

main();

Demo

https://totp.cdn.jsx.jp

Lint

npm run lint --if-present

Test

npm test
0.2.1

1 year ago

0.1.2

1 year ago

0.2.0

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago