otplib API Documentation / @otplib/hotp / HOTPVerifyOptions
Type Alias: HOTPVerifyOptions
HOTPVerifyOptions =
HOTPGenerateOptions&object
Defined in: hotp/src/types.ts:64
Required options for HOTP verification
Requires secret, counter, token, and crypto for verification.
Type Declaration
counterTolerance?
readonlyoptionalcounterTolerance:number|number[]
Counter tolerance for verification (default: 0)
- Number: symmetric look-ahead window [counter, counter + counterTolerance]
- Array: asymmetric window, where positive values are look-ahead and negative values are look-back Examples: [0, 1] allows counter and counter+1; [-1, 0, 1] allows counter-1, counter, counter+1
token
readonlytoken:string
The OTP token to verify