Skip to content

Documents for @litert/otp / URL / IUrlInfo

Interface: IUrlInfo

Defined in: URL.ts:24

Extended by

Properties

betterCompatibility?

optional betterCompatibility: boolean

Defined in: URL.ts:31

Do not escape '=' in the key/secret, to improve compatibility with some authenticator apps.

Default

ts
false

digest?

optional digest: EDigest

Defined in: URL.ts:78

The digest algorithm used to generate the OTP code.

Warning

Not all authenticator apps support SHA256 or SHA512.

Default

ts
'SHA1'

See


digits?

optional digits: number

Defined in: URL.ts:56

The output width of OTP.

Default

ts
6

Warning

Not all authenticator apps support digits other than 6.

See

https://datatracker.ietf.org/doc/html/rfc4226#section-5


issuer?

optional issuer: null | string

Defined in: URL.ts:66

The issuer of OTP code to display in OTP authenticator app.


key

key: string | Buffer<ArrayBufferLike>

Defined in: URL.ts:40

The key of OTP code.

If the key is a string, it must be BASE32-encoded.

See

https://datatracker.ietf.org/doc/html/rfc4226#section-5.1


label

label: string

Defined in: URL.ts:61

The label of OTP code to display in OTP authenticator app.


type

type: "hotp" | "totp"

Defined in: URL.ts:45

The type of OTP.