feat: Implement two-factor authentication (2FA) with dedicated endpoints for setup, enabling, disabling, verification, and backup code management.

This commit is contained in:
pradeepkumar committed 2026-02-06 09:30:12 +05:30
1 parent ea05e18c15
commit 750cb55764
10 files changed
+989 -19

No files matched your search

+6
View File
@@ -83,6 +83,12 @@ model User {
facebookId String? @unique
twitterId String? @unique
// Two-Factor Authentication
twoFactorEnabled Boolean @default(false)
twoFactorSecret String? // Encrypted TOTP secret
twoFactorBackupCodes String? // JSON array of hashed backup codes
twoFactorVerifiedAt DateTime? // When 2FA was enabled
// Timestamps
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt