Interface: TOTPSecret
Defined in: src/auth/types.ts:124
Describes a secret used for TOTP authentication. The digits/period/algorithm parameters are
captured at registration time (rather than always deferring to the current TOTPConfig) so a
secret keeps verifying correctly even if the relying party's configured defaults change later.
Properties
algorithm?
optionalalgorithm?:TOTPAlgorithm
Defined in: src/auth/types.ts:131
The HMAC hash algorithm used to generate the associated token, if it differs from the library default.
digits?
optionaldigits?:number
Defined in: src/auth/types.ts:127
The number of digits the associated token contains, if it differs from the library default.
epochTolerance?
optionalepochTolerance?:number|number[]
Defined in: src/auth/types.ts:137
Specifies a tolerance window around the current time. It does not represent a strict duration in seconds
(e.g., "±N seconds"), but rather dictates which periods overlap with the tolerance window [currentTime - tolerance, currentTime + tolerance]. Default value is [5, 0].
period?
optionalperiod?:number
Defined in: src/auth/types.ts:129
The time step, in seconds, that the associated token remains valid for, if it differs from the library default.
secret
secret:
string
Defined in: src/auth/types.ts:125