Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

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

Validates an HOTP token.

Parameters

unnamed 0: { token: string; 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.