otplib API Documentation / @otplib/hotp / HOTPVerifyOptions
Type Alias: HOTPVerifyOptions
HOTPVerifyOptions =
HOTPGenerateOptions&object
Defined in: hotp/src/types.ts:71
Required options for HOTP verification
Requires secret, counter, token, and crypto for verification.
Type Declaration
counterTolerance?
readonlyoptionalcounterTolerance:number| [number,number]
Counter tolerance for verification (default: 0)
- Number: creates look-ahead only tolerance [0, n] (secure default per RFC 4226)
- Tuple [past, future]: explicit window control Examples: [0, 5] allows 5 future counters; [5, 5] allows ±5 symmetric
token
readonlytoken:string
The OTP token to verify