totp-generator lets you generate TOTP tokens from a TOTP key
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
- SHA-1
- 30 sec epoch interval
- 6 digit tokens
- E2E tests (where you need to login with 2-factor authentication)