otplib API Documentation / @otplib/uri / OTPAuthParams
Type Alias: OTPAuthParams
OTPAuthParams =
object
Defined in: packages/uri/src/types.ts:11
otpauth:// URI parameters
Properties
algorithm?
readonlyoptionalalgorithm?:HashAlgorithm
Defined in: packages/uri/src/types.ts:27
Hash algorithm. Parsing preserves absence; OTP consumers default to sha1. Some authenticator apps ignore this parameter; sha1 has the widest interoperability.
counter?
readonlyoptionalcounter?:number
Defined in: packages/uri/src/types.ts:40
Initial counter value for HOTP. Required by the Key URI format; parsing preserves absence, while HOTP generation helpers default to 0.
digits?
readonlyoptionaldigits?:Digits
Defined in: packages/uri/src/types.ts:34
Number of digits. Parsing preserves absence; OTP consumers default to 6. The Key URI format defines 6 or 8; some authenticator apps ignore this parameter.
issuer?
readonlyoptionalissuer?:string
Defined in: packages/uri/src/types.ts:20
Service/provider name (recommended)
period?
readonlyoptionalperiod?:number
Defined in: packages/uri/src/types.ts:48
Time step in seconds for TOTP. Parsing preserves absence; OTP consumers default to 30. Some authenticator apps ignore this parameter, so 30 has the widest interoperability.
secret
readonlysecret:string
Defined in: packages/uri/src/types.ts:15
Base32-encoded shared secret (required)