iya-sts
    Preparing search index...

    Variable verify

    verify: (
        record: HotpRecord,
        presented: unknown,
        opts?: { window?: string | number },
    ) => HotpVerdict = ...

    Type Declaration

      • (
            record: HotpRecord,
            presented: unknown,
            opts?: { window?: string | number },
        ): HotpVerdict
      • Verifies a presented code against a record by look-ahead from its counter. A refusal carries its error code.

        Parameters

        • record: HotpRecord

          the HOTP record (secret, digits, algorithm, counter, the next counter the token is expected to show)

        • presented: unknown

          the code as typed

        • Optionalopts: { window?: string | number }

          window, overriding hotp.window

        Returns HotpVerdict

        { ok: true, counter, next, ahead } or { ok: false, reason, detail }, reason one of shape, store or mismatch