otplib-core/totpCheckWithWindow

Checks the provided OTP token against system generated token with support for checking previous or future x time-step windows

Source:
Parameters:
Name Type Description
token string

the OTP token to check

secret string

your secret that is used to generate the token

options object

options which was used to generate it originally

Returns:
Type:
integer | null
  • the number of windows back (eg: -1) or forward if it was successful. null otherwise