Fix account deletion flow

This commit is contained in:
gpt-engineer-app[bot]
2025-10-29 22:46:49 +00:00
parent 2918f9d280
commit a2cb037410
8 changed files with 143 additions and 28 deletions

View File

@@ -48,7 +48,7 @@ export function AccountDeletionDialog({ open, onOpenChange, userEmail, onDeletio
{ action: 'Request account deletion' }
);
sessionStorage.setItem('mfa_step_up_required', 'true');
sessionStorage.setItem('mfa_intended_path', '/settings?tab=privacy');
sessionStorage.setItem('mfa_intended_path', '/settings');
window.location.href = '/auth';
return;
}
@@ -66,6 +66,10 @@ export function AccountDeletionDialog({ open, onOpenChange, userEmail, onDeletio
if (error) throw error;
// Clear MFA session storage
sessionStorage.removeItem('mfa_step_up_required');
sessionStorage.removeItem('mfa_intended_path');
dispatch({
type: 'REQUEST_DELETION',
payload: { scheduledDate: data.scheduled_deletion_at }