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 = Behin.totp.generate(secret);
// Verify a time base OTP token
const isValid = Behin.totp.verify(secret, token);
lucacasonato / behin Goto Github PK
View Code? Open in Web Editor NEWThis project forked from lolivei/behin
One-time password lib for Deno ๐ฆโฑ (TOTP/HOTP)
License: MIT License