mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 02:11:12 -05:00
Fix account deletion flow
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user