totp-basic
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

totp-basic

A totp library in typescript that requires no external libraries.

Uses crypto.subtle API support, so that it can be used in browsers, as-is! It can also be used in cloudflare-workers amongst others!

Usage

npm install totp-basic
import {verifyTOTP, generateTOTP} from "totp-basic";
        const secret = 'mysecret';
        const otp = await generateTOTP(secret);
        const isValid = await verifyTOTP(secret, otp);

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i totp-basic

    Weekly Downloads

    4

    Version

    0.0.9

    License

    Apache-2.0

    Unpacked Size

    15.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • ganesh47