Documents for @litert/otp / URL / IUrlInfoForTOTP
Interface: IUrlInfoForTOTP
Defined in: URL.ts:94
Extends
Properties
betterCompatibility?
optional
betterCompatibility:boolean
Defined in: URL.ts:31
Do not escape '=' in the key/secret, to improve compatibility with some authenticator apps.
Default
false
Inherited from
digest?
optional
digest:EDigest
Defined in: URL.ts:78
The digest algorithm used to generate the OTP code.
Warning
Not all authenticator apps support SHA256 or SHA512.
Default
'SHA1'
See
- https://datatracker.ietf.org/doc/html/rfc4226#section-5
- https://datatracker.ietf.org/doc/html/rfc6238#section-1.2
Inherited from
digits?
optional
digits:number
Defined in: URL.ts:56
The output width of OTP.
Default
6
Warning
Not all authenticator apps support digits other than 6.
See
https://datatracker.ietf.org/doc/html/rfc4226#section-5
Inherited from
issuer?
optional
issuer:null
|string
Defined in: URL.ts:66
The issuer of OTP code to display in OTP authenticator app.
Inherited from
key
key:
string
|Buffer
<ArrayBufferLike
>
Defined in: URL.ts:40
The key of OTP code.
If the key is a string, it must be BASE32-encoded.
See
https://datatracker.ietf.org/doc/html/rfc4226#section-5.1
Inherited from
label
label:
string
Defined in: URL.ts:61
The label of OTP code to display in OTP authenticator app.
Inherited from
period?
optional
period:number
Defined in: URL.ts:107
The interval of every TOTP code, in seconds.
Default
30
Warning
Not all authenticator apps support period other than 30 seconds.
See
https://datatracker.ietf.org/doc/html/rfc6238#section-4.1
type
type:
"totp"
Defined in: URL.ts:96
The type of OTP.