Super Simple One Time Passwords for Deno llms.txt
in short:
One Time Password Generator for Deno
SSTOTP is as simple as it gets for a TOTP implementation. The libary can do the following:
- Generate TOTP Secrets
- Generate TOTP Tokens
- Validate TOTP Tokens
Tokens are valid for 30 seconds, and a step tolerance of two is implemented to account for clock skew.
It has a single standard library dependency, which is base32.
At this time, it is considered feature complete. Generating otpauth:// QR codes is left as an exercise to the reader.
Check it out here
Usage
import sstotp from "https://deno.land/x/sstotp/mod.ts";
// Generate a Base32 Secret Key
const secret = sstotp.genSecret();
// Generate a OTP for a given secret
const token = await sstotp.genToken(secret)
// Check Validity of Tokens
const isValid = await sstotp.chkToken(secret, token)
Tip Jar
Ethereum (Mainnet)
ethereum:pay-0x0cA8353644465a21BAeFdE854A442fE94708a54c@1
0x0cA8353644465a21BAeFdE854A442fE94708a54c
(Copy)
Polygon (Mainnet)
ethereum:pay-0x0cA8353644465a21BAeFdE854A442fE94708a54c@137
0x0cA8353644465a21BAeFdE854A442fE94708a54c
(Copy)
Bitcoin (Taproot)
bitcoin:bc1pu34s92tpl0j3cp7dfvm87zgyn4mdkp5nx5ckaeczuhunpsf7qgcshf4ptg
bc1pu34s92tpl0j3cp7dfvm87zgyn4mdkp5nx5ckaeczuhunpsf7qgcshf4ptg
(Copy)
Syndicated to:
Comments