native-browser-otp
v1.0.2
Published
Generate TOTP and HOTP with browser's native Web Cryptography.
Downloads
90
Readme
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
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);