A two-factor authentication(2FA) based on HOTP & TOTP written in TypeScript.
💋 KISS. Keep it small and simple.
- Based on HOTP/TOTP algorithm
- Get code by raw key
- Get code by encoded key
- Encode/Decode key
- Gen random key
- typescript
4.7.4 - node
v16.15.1 - ts-node
v10.8.2 - yarn
v1.22.19
npm install @jovijovi/two-fa.jsor
yarn add @jovijovi/two-fa.jsimport {twofa} from '@jovijovi/two-fa.js';
const code = twofa.GetCode(key);
console.debug("Code=", code);- Documents
- QR