Skip to content

Generate TOTP and HOTP with browser's native Web Cryptography.

License

Notifications You must be signed in to change notification settings

g12i/native-browser-otp

Repository files navigation

native-browser-otp

Generate TOTP and HOTP with browser's native Web Cryptography.

Very lightweight, 1.02 KiB / 0.59 KiB gzip with just one dependency.

See caniuse.com/cryptography for Browser support.

Demo

See here.

Quick start

npm install native-browser-otp
pnpm install native-browser-otp
yarn add native-browser-otp
import { totp } from "native-browser-otp";

const code = await totp(BASE_32_SECRET);

About

Generate TOTP and HOTP with browser's native Web Cryptography.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published