Skip to content

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?

optional algorithm: HashAlgorithm

Defined in: otplib/src/class.ts:196

Hash algorithm (default: 'sha1')


counter?

optional counter: number

Defined in: otplib/src/class.ts:213

Counter value (default: 0) Used by HOTP strategy


digits?

optional digits: 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?

optional period: 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

Released under the MIT License.