otplib API Documentation / otplib / OTPVerifyFunctionalOptions
Type Alias: OTPVerifyFunctionalOptions
OTPVerifyFunctionalOptions =
OTPFunctionalOptions&object
Defined in: otplib/src/types.ts:112
Options for OTP verification
Extends OTPFunctionalOptions with token and tolerance parameters.
Type Declaration
counterTolerance?
optionalcounterTolerance:number|number[]
Counter tolerance for HOTP verification (default: 0)
- Number: symmetric look-ahead window
- Array: asymmetric window
epochTolerance?
optionalepochTolerance:number| [number,number]
Time tolerance in seconds for TOTP verification (default: 0)
- Number: symmetric tolerance (same for past and future)
- Tuple [past, future]: asymmetric tolerance Use [5, 0] for RFC-compliant past-only verification.
token
token:
string
OTP code to verify