Implements TOTP (Google Authenticator) and Email-based MFA: Backend Features: - MFA database fields (mfa_enabled, mfa_method, totp_secret, backup_codes) - V010 migration for MFA support - MFAService with TOTP and Email MFA support - QR code generation for Google Authenticator setup - 10 backup codes per user (hashed storage) - Email verification codes (6-digit, 5min expiry) - MFA verification with backup code support API Endpoints: - GET /api/v1/auth/mfa/status - POST /api/v1/auth/mfa/totp/setup - POST /api/v1/auth/mfa/totp/enable - POST /api/v1/auth/mfa/email/setup - POST /api/v1/auth/mfa/email/send-code - POST /api/v1/auth/mfa/verify - DELETE /api/v1/auth/mfa - POST /api/v1/auth/mfa/backup-codes/regenerate Dependencies: otplib, qrcode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
563 KiB
563 KiB