zerobyte/app/drizzle/0029_demonic_namor.sql
Jakub Trávník a4d0c7b0c9 feat: add two-factor authentication (TOTP) support
- Add 2FA endpoints for setup, enable, disable, and verify
- Encrypt TOTP secrets with AES-256-GCM before storing
- Require password for both enabling and disabling 2FA
- Invalidate all sessions when 2FA status changes
- Add QR code display using qrcode.react (client-side)
- Add 2FA verification step in login flow
- Add CLI recovery command: 2fa disable -u <username>
- Add success variant to Badge component
- Update README with 2FA documentation
2026-01-03 00:19:04 +01:00

2 lines
No EOL
150 B
SQL

ALTER TABLE `users_table` ADD `totp_secret` text;--> statement-breakpoint
ALTER TABLE `users_table` ADD `totp_enabled` integer DEFAULT false NOT NULL;