Auto login after signup

This commit is contained in:
Krao Hasanee
2026-03-26 23:44:31 -04:00
parent 719209fa25
commit ee99465f8a
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -55,6 +55,9 @@ export function AuthProvider({ children }) {
options: { data: { name, role: 'client' } },
});
if (error) return { error: error.message };
// Auto sign-in immediately after signup (no email confirmation required)
const { error: loginError } = await supabase.auth.signInWithPassword({ email, password });
if (loginError) return { error: loginError.message };
return {};
};
+1 -1
View File
@@ -19,7 +19,7 @@ export default function Signup() {
setError('');
const { error: err } = await signup(form.email, form.password, form.name);
if (err) { setError(err); setLoading(false); return; }
navigate('/signup-confirmation');
navigate('/my-projects');
};
return (