© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
9 replies
Mike

Error with sessions

Hello i have the code to signUp and login the user. The user is registered and the email is confirmated. I tried to login with a user and send him to the dashboard page but nohting is working.He is sent to the login page because no session was found. That is the response of One the picture you can see the response of signInWithPassword.I had no errors with Postgres. Here is my signInWithPassword method:

 export async function signInWithPassword(email, password) {
  const response = await supabase.auth.signInWithPassword({
    email: email,
    password: password,
  });
  return response;
}
 export async function signInWithPassword(email, password) {
  const response = await supabase.auth.signInWithPassword({
    email: email,
    password: password,
  });
  return response;
}





function App() {
const [user, setUser] = useState(null);
useEffect(() => {
const session = supabase.auth.getSession();
setUser(session?.user ?? null);
const { data: authListener } = supabase.auth.onAuthStateChange(
async (event, session) => {
const currentUser = session?.user;
setUser(currentUser ?? null);
}
);

return () => {
authListener?.subscription.unsubscribe();
};
}, [user]);

`
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Sessions
SupabaseSSupabase / help-and-questions
3mo ago
Account Sessions
SupabaseSSupabase / help-and-questions
3y ago
Weird issue with sessions using supabase python & django
SupabaseSSupabase / help-and-questions
3y ago
OAuth never saving sessions
SupabaseSSupabase / help-and-questions
3y ago