Refactor: Implement email confirmation for password auth

This commit is contained in:
gpt-engineer-app[bot]
2025-10-14 15:39:05 +00:00
parent 92a0bf1257
commit 677f14ee7b
6 changed files with 49 additions and 26 deletions

View File

@@ -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();
}