@radzor/two-factor-auth
TOTP-based two-factor authentication. Generate secrets, create QR URIs, and verify tokens (RFC 6238).
Authenticationv0.1.0typescriptpythonServer2fatotpotpauthenticationsecuritymfaby Radzor
Install
View source on GitHub →$npx radzor@latest add two-factor-auth
⚠ Constraints: No external dependencies. TOTP tokens are time-based (RFC 6238) — server clock must be accurate. Default window is ±1 period (30 seconds). QR URIs use otpauth:// format.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| issuer* | string | — | App or service name shown in authenticator apps. |
| digits | number | — | Number of digits in OTP (default: 6) |
| period | number | — | Time step in seconds (default: 30) |
issuer*string
App or service name shown in authenticator apps.
digitsnumber
Number of digits in OTP (default: 6)
periodnumber
Time step in seconds (default: 30)