feat: Implement two-factor authentication (2FA) with dedicated endpoints for setup, enabling, disabling, verification, and backup code management.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user