Skip to content

otplib API Documentation / @otplib/hotp / VerifyResultValid

Type Alias: VerifyResultValid

VerifyResultValid = object

Defined in: hotp/src/types.ts:79

Successful verification result with delta offset

Properties

delta

readonly delta: number

Defined in: hotp/src/types.ts:89

The offset from the base counter/time step where the token matched.

  • For HOTP: Number of counter steps ahead (0 = exact match, 1 = one ahead, etc.)
  • For TOTP: Number of time periods offset (can be negative for past, positive for future)

Use this value to resynchronize the counter (HOTP) or detect clock drift (TOTP).


valid

readonly valid: true

Defined in: hotp/src/types.ts:81

Token is valid

Released under the MIT License.