otplib API Documentation / otplib / OTPURIGenerateOptions
Type Alias: OTPURIGenerateOptions
OTPURIGenerateOptions =
object
Defined in: otplib/src/class.ts:177
Options for generating URI with the OTP class
Properties
algorithm?
optionalalgorithm:HashAlgorithm
Defined in: otplib/src/class.ts:196
Hash algorithm (default: 'sha1')
counter?
optionalcounter:number
Defined in: otplib/src/class.ts:213
Counter value (default: 0) Used by HOTP strategy
digits?
optionaldigits:Digits
Defined in: otplib/src/class.ts:201
Number of digits (default: 6)
issuer
issuer:
string
Defined in: otplib/src/class.ts:181
Issuer name (e.g., 'ACME Co')
label
label:
string
Defined in: otplib/src/class.ts:186
Label/Account name (e.g., 'john@example.com')
period?
optionalperiod:number
Defined in: otplib/src/class.ts:207
Time step in seconds (default: 30) Used by TOTP strategy
secret
secret:
string
Defined in: otplib/src/class.ts:191
Base32-encoded secret key