Creates a TOTP object.
Optional
config: { Configuration options.
HMAC hashing algorithm.
Token length.
Account provider.
Include issuer prefix in label.
Account label.
Token time-step duration.
Secret key.
HMAC hashing algorithm.
Token length.
Account provider.
Include issuer prefix in label.
Account label.
Token time-step duration.
Secret key.
Static
defaultsDefault configuration.
Validates a TOTP token.
Configuration options.
Timestamp value in milliseconds.
Token value.
Window of counter values to test.
Token delta or null if it is not found in the search window, in which case it should be considered invalid.
Static
generateGenerates a TOTP token.
Configuration options.
HMAC hashing algorithm.
Token length.
Token time-step duration.
Secret key.
Timestamp value in milliseconds.
Token.
Static
validateValidates a TOTP token.
Configuration options.
HMAC hashing algorithm.
Token length.
Token time-step duration.
Secret key.
Timestamp value in milliseconds.
Token value.
Window of counter values to test.
Token delta or null if it is not found in the search window, in which case it should be considered invalid.
TOTP: Time-Based One-Time Password Algorithm.
See
RFC 6238