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

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

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