Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/otpauth/dist/otpauth.esm.min.js>TOTP.generate

One Time Password (HOTP/TOTP) library for Node.js, Deno, Bun and browsers.
Latest
method TOTP.generate
import { TOTP } from "https://deno.land/x/otpauth@v9.3.5/dist/otpauth.esm.min.js";

Generates a TOTP token.

Parameters

unnamed 0: { secret: Secret; algorithm?: string | undefined; digits?: number | undefined; period?: number | undefined; timestamp?: number | undefined; }

Configuration options.

Returns

string

Token.