managarten/apps/chat
Till JS f5a9edcfb6 feat(auth): add TOTP two-factor authentication across all apps
Uses Better Auth's built-in twoFactor plugin for TOTP + backup codes:

Backend (mana-core-auth):
- twoFactor plugin in better-auth.config.ts (issuer: ManaCore)
- twoFactorEnabled field on users table, backupCodes as encrypted text
- 2FA redirect detection in signIn flow
- Passthrough controller forwards /two-factor/* to Better Auth
- Security event types for 2FA operations

Client (shared-auth):
- enableTwoFactor, disableTwoFactor, verifyTwoFactor, verifyBackupCode,
  generateBackupCodes methods with session-to-token exchange

UI (shared-auth-ui):
- LoginPage: 2FA code input view after password login, backup code toggle
- TwoFactorSetup: settings component with enable/disable/QR code/backup codes

App integration:
- All 19 auth stores have verifyTwoFactor() and verifyBackupCode()
- All 19 login pages pass onVerifyTwoFactor and onVerifyBackupCode callbacks
- ManaCore settings page has TwoFactorSetup component

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 19:55:09 +01:00
..
apps feat(auth): add TOTP two-factor authentication across all apps 2026-03-26 19:55:09 +01:00
packages/chat-types feat(versioning): add semantic versioning and changesets to all apps 2026-03-19 16:20:18 +01:00
CLAUDE.md feat(chat): add all Mac Mini Ollama models to playground 2026-01-30 17:48:40 +01:00
INTEGRATION_COMPLETE.md style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
MANA_CORE_AUTH_INTEGRATION.md style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
package.json feat(versioning): add semantic versioning and changesets to all apps 2026-03-19 16:20:18 +01:00
TESTING_GUIDE.md 🔒 security(auth): migrate to EdDSA JWT and add automated monitoring 2025-12-18 21:42:47 +01:00