Implement MFA Enforcement

This commit is contained in:
gpt-engineer-app[bot]
2025-10-14 13:45:59 +00:00
parent 121f7c533a
commit 7aa219efe5
10 changed files with 216 additions and 12 deletions

View File

@@ -113,16 +113,14 @@ export function TOTPSetup() {
toast({
title: 'TOTP Enabled',
description: 'Two-factor authentication has been successfully enabled for your account.'
description: 'Please sign in again to activate MFA protection.'
});
// Reset state and refresh factors
setEnrolling(false);
setQrCode('');
setSecret('');
setFactorId('');
setVerificationCode('');
fetchTOTPFactors();
// Force sign out to get new session with AAL2
setTimeout(async () => {
await supabase.auth.signOut();
window.location.href = '/auth';
}, 2000);
} catch (error: any) {
toast({
title: 'Error',