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 {};
};