Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

totp-generator

0.0.7 • Public • Published

totp-generator

Build Status Code Climate Test Coverage npm Version

totp-generator lets you generate TOTP tokens from a TOTP key

How to use

var totp = require('totp-generator');
 
var token = totp('JBSWY3DPEHPK3PXP');
 
console.log(token); // prints a 6 digit time base token based on inputed key and time

Works with these token requirements

  • SHA-1
  • 30 sec epoch interval
  • 6 digit tokens

What do I use this library for?

  • E2E tests (where you need to login with 2-factor authentication)

Install

npm i totp-generator

DownloadsWeekly Downloads

2,474

Version

0.0.7

License

MIT

Unpacked Size

5.31 kB

Total Files

7

Last publish

Collaborators

  • avatar