Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/otpauth/dist/otpauth.umd.min.js>TOTP#generate

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

Generates a TOTP token.

Parameters

optional
unnamed 0: { timestamp?: number | undefined; } | undefined

Configuration options.

Returns

string

Token.