Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.02 KB

README.md

File metadata and controls

25 lines (19 loc) · 1.02 KB

Intro

GitHub Actions status | linter GitHub Actions status | publish GitHub Actions status | test

Totp util base on rfc6238 for two step authentication

Install

npm install --save git+https://[email protected]/anzerr/totp.util.git
npm install --save @anzerr/totp.util

Example

Both examples works with google authentication. Online example or a console version can be found in test/example.js

const {Totp} = require('totp.util');

let t = new Totp('12345678901234567890');
console.log(t.get());

let gen = Totp.generate();
console.log(gen.key.toString(), gen.get());