You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Two-factor authentication (TOTP) for user accounts #65
User accounts can only be protected by a password today. Add TOTP-based 2FA (Authy, Google Authenticator, 1Password, etc.) for all users, with the option for Team workspace owners to require it for every member.
What's needed
Backend
New columns: users.totp_secret (encrypted with the same key used for SMTP passwords), users.totp_enabled bool, users.totp_enabled_at timestamptz
New table: user_recovery_codes (id, user_id, code_hash, used_at) — 10 codes generated at enrollment, hashed at rest, single-use
Endpoints:
POST /api/v1/auth/totp/setup — returns provisioning URI + QR PNG + 10 recovery codes (only shown once)
POST /api/v1/auth/totp/verify — confirms the code and flips totp_enabled = true
POST /api/v1/auth/totp/disable — requires current password + valid TOTP code
POST /api/v1/auth/login — accepts an optional totp_code field; returns 403 with code: totp_required when 2FA is on and no code was supplied
Workspace setting: workspaces.require_totp — when true, members without 2FA can't access workspace endpoints (Team)
Activity
chore(release): prepare v0.6.5.1
JuansesDev commentedon Jun 17, 2026
Shipped in v0.6.5.1 — TOTP two-factor authentication with recovery codes, plus new-device step-up. Closing as completed.