Skip to content

otplib API Documentation / @otplib/uri / OTPAuthParams

Type Alias: OTPAuthParams

OTPAuthParams = object

Defined in: packages/uri/src/types.ts:11

otpauth:// URI parameters

Properties

algorithm?

readonly optional algorithm: HashAlgorithm

Defined in: packages/uri/src/types.ts:26

Hash algorithm (default: sha1) Note: Google Authenticator only supports sha1


counter?

readonly optional counter: number

Defined in: packages/uri/src/types.ts:37

Initial counter value for HOTP (default: 0)


digits?

readonly optional digits: Digits

Defined in: packages/uri/src/types.ts:32

Number of digits (default: 6) Google Authenticator supports 6 or 8


issuer?

readonly optional issuer: string

Defined in: packages/uri/src/types.ts:20

Service/provider name (recommended)


period?

readonly optional period: number

Defined in: packages/uri/src/types.ts:42

Time step in seconds for TOTP (default: 30)


secret

readonly secret: string

Defined in: packages/uri/src/types.ts:15

Base32-encoded shared secret (required)

Released under the MIT License.