Skip to content
/ totp Public
forked from m-dressler/totp

Generate TOTP passwords using a TOTP token

Notifications You must be signed in to change notification settings

clouedoc/totp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@clouedoc/totp

A function to generate TOTP values using a base64 encoded token

Compatibility

This is a fork of @md/totp.

This version uses globalThis instead of window which adds Bun and Deno compatibility while being backwards compatible with browsers.

(Cloudflare workers compatibility is unknown -- let me know if you have the chance to test it!)

Example

import getTotp from "jsr:@clouedoc/totp";

const token = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
const totp = getTotp(token); // e.g. "431987"

About

Generate TOTP passwords using a TOTP token

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%