mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 05:51:15 -05:00
Refactor: Implement sign-out and re-login flow
This commit is contained in:
@@ -18,7 +18,7 @@ import type { OAuthProvider } from '@/types/identity';
|
||||
interface PasswordSetupDialogProps {
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
onSuccess: () => void;
|
||||
onSuccess: (email?: string) => void;
|
||||
provider?: OAuthProvider;
|
||||
mode?: 'standalone' | 'disconnect';
|
||||
}
|
||||
@@ -59,7 +59,13 @@ export function PasswordSetupDialog({
|
||||
if (result.success) {
|
||||
setPassword('');
|
||||
setConfirmPassword('');
|
||||
onSuccess();
|
||||
|
||||
if (result.needsRelogin && result.email) {
|
||||
// Pass email to parent for redirect handling
|
||||
onSuccess(result.email);
|
||||
} else {
|
||||
onSuccess();
|
||||
}
|
||||
onOpenChange(false);
|
||||
} else {
|
||||
setError(result.error || 'Failed to set password');
|
||||
|
||||
Reference in New Issue
Block a user