Refactor: Simplify Add Password flow

This commit is contained in:
gpt-engineer-app[bot]
2025-10-14 17:18:08 +00:00
parent 70f94b8a30
commit d6035bebac
2 changed files with 57 additions and 49 deletions

View File

@@ -36,6 +36,25 @@ export default function AuthCallback() {
const urlParams = new URLSearchParams(window.location.search);
const action = urlParams.get('action');
if (action === 'password-setup-direct') {
console.log('[AuthCallback] Processing password-setup-direct action (direct reset flow)');
// User set password via Supabase's hosted page
// Email identity is already created automatically
toast({
title: "Password Set Successfully!",
description: "Your email identity has been created. You can now sign in with your email and password.",
});
// Redirect to auth page for sign-in
setTimeout(() => {
navigate('/auth');
}, 1500);
return;
}
if (action === 'password-setup') {
console.log('[AuthCallback] Processing password-setup action');