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

x/otpauth/dist/otpauth.umd.min.js>HOTP.validate

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

Validates an HOTP token.

Parameters

unnamed 0: { token: string; secret: Secret; algorithm?: string | undefined; digits?: number | undefined; counter?: number | undefined; window?: number | undefined; }

Configuration options.

Returns

number | null

Token delta or null if it is not found in the search window, in which case it should be considered invalid.