native-browser-otp
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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);

Package Sidebar

Install

npm i native-browser-otp

Weekly Downloads

10

Version

1.0.1

License

ISC

Unpacked Size

6.28 kB

Total Files

7

Last publish

Collaborators

  • g12i