Skip to content

14Kay/totp-auth

Repository files navigation

totp-auth

npm version npm downloads bundle JSDocs

100% JS's TOTP authenticator with no dependencies. You can use it in any javascript environment

Quick Start

npm install @14kay/totp-auth --save
import TOTPAuth from '@14kay/totp-auth'

const secret = 'JBSWY3DPEHPK3PXP'
const code = TOTPAuth.totp(secret) // 666666

Get time remaining

const timeRemaining = OTPAuth.timeRemaining() // 15

code Verify

const isLegal = OTPAuth.totpVerify('123456') // true or false

License

MIT License © 2024-PRESENT 14K

About

100% JS's TOTP authenticator with no dependencies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published