Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 470 Bytes

README.MD

File metadata and controls

19 lines (13 loc) · 470 Bytes

Behin 🦕

One-time password lib for Deno, based on Speakeasy.

Usage

import Behin from "https://deno.land/x/behin/mod.ts";

// Generate a Base32 encoded secret.
const secret = Behin.generateSecret();

// Generate one-time token for a given secret
const token = await Behin.totp.generate(secret);

// Verify a time base OTP token
const isValid = await Behin.totp.verify(secret, token);