otplib API Documentation / @otplib/uri / URIOptions
Type Alias: URIOptions
URIOptions =
object
Defined in: packages/uri/src/generate.ts:7
Base options for URI generation
Properties
algorithm?
optionalalgorithm:HashAlgorithm
Defined in: packages/uri/src/generate.ts:27
Hash algorithm (default: 'sha1') Note: Google Authenticator only supports sha1
counter?
optionalcounter:number
Defined in: packages/uri/src/generate.ts:43
Counter value for HOTP
digits?
optionaldigits:Digits
Defined in: packages/uri/src/generate.ts:33
Number of digits (default: 6) Google Authenticator supports 6 or 8, RFC also allows 7
issuer?
optionalissuer:string
Defined in: packages/uri/src/generate.ts:11
Service/provider name (e.g., 'ACME Co', 'GitHub', 'AWS')
label?
optionallabel:string
Defined in: packages/uri/src/generate.ts:16
Account identifier (e.g., email, username)
period?
optionalperiod:number
Defined in: packages/uri/src/generate.ts:38
Time step in seconds for TOTP (default: 30)
secret
secret:
string
Defined in: packages/uri/src/generate.ts:21
Base32-encoded secret key