mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 10:11:13 -05:00
Refactor: Implement email confirmation for password auth
This commit is contained in:
@@ -18,7 +18,7 @@ import type { OAuthProvider } from '@/types/identity';
|
||||
interface PasswordSetupDialogProps {
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
onSuccess: (email?: string) => void;
|
||||
onSuccess: (email?: string, needsConfirmation?: boolean) => void;
|
||||
provider?: OAuthProvider;
|
||||
mode?: 'standalone' | 'disconnect';
|
||||
}
|
||||
@@ -61,8 +61,8 @@ export function PasswordSetupDialog({
|
||||
setConfirmPassword('');
|
||||
|
||||
if (result.needsRelogin && result.email) {
|
||||
// Pass email to parent for redirect handling
|
||||
onSuccess(result.email);
|
||||
// Pass email and confirmation flag to parent for redirect handling
|
||||
onSuccess(result.email, result.needsEmailConfirmation);
|
||||
} else {
|
||||
onSuccess();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user