iya-sts
    Preparing search index...

    Variable resync

    resync: (
        record: HotpRecord,
        first: unknown,
        second: unknown,
        opts?: { window?: string | number },
    ) => HotpVerdict = ...

    Type Declaration

      • (
            record: HotpRecord,
            first: unknown,
            second: unknown,
            opts?: { window?: string | number },
        ): HotpVerdict
      • Finds the counter two consecutive codes came from, over the resync window. A refusal carries its error code.

        Parameters

        • record: HotpRecord

          the HOTP record

        • first: unknown

          the first code

        • second: unknown

          the code the token showed next

        • Optionalopts: { window?: string | number }

          window, overriding hotp.resyncWindow

        Returns HotpVerdict

        { ok: true, counter, next, ahead } (counter the second code's), or a refusal