Skip to content

otplib API Documentation / @otplib/totp / Digits

Type Alias: Digits

Digits = number

Defined in: core/src/types.ts:12

Number of characters in the OTP code.

Standard TOTP/HOTP uses 6-8 digits. Non-standard variants (e.g., Steam Guard) may use different lengths. Runtime validation is handled by guardrails.

Released under the MIT License.