Super Simple One Time Passwords for Deno llms.txt

/ 1 Frimaire 232
One minute / 118 words
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:

  1. Generate TOTP Secrets
  2. Generate TOTP Tokens
  3. 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

Select a network to open a wallet link or show a QR code.

Ethereum icon Ethereum (Mainnet)
Ethereum QR code

ethereum:pay-0x0cA8353644465a21BAeFdE854A442fE94708a54c@1

0x0cA8353644465a21BAeFdE854A442fE94708a54c (Copy)

Polygon icon Polygon (Mainnet)
Polygon QR code

ethereum:pay-0x0cA8353644465a21BAeFdE854A442fE94708a54c@137

0x0cA8353644465a21BAeFdE854A442fE94708a54c (Copy)

Bitcoin icon Bitcoin (Taproot)
Bitcoin QR code

bitcoin:bc1pu34s92tpl0j3cp7dfvm87zgyn4mdkp5nx5ckaeczuhunpsf7qgcshf4ptg

bc1pu34s92tpl0j3cp7dfvm87zgyn4mdkp5nx5ckaeczuhunpsf7qgcshf4ptg (Copy)

Comments