Skip to content
/ behin Public

One-time password lib for Deno 🦕⏱ (TOTP/HOTP)

License

Notifications You must be signed in to change notification settings

lolivei/behin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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