© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
8 replies
Java

getSession() is null after login?

I'm currently trying to get the user in a client component however:

    const session = supabaseClient.auth.getSession().then((data) => {
      console.log(data);
    });
    const session = supabaseClient.auth.getSession().then((data) => {
      console.log(data);
    });

returns
{data: {…}, error: null}
data: {session: null}
{data: {…}, error: null}
data: {session: null}


All of my other widgets that use the server client is able to get user no problem but for some reason session must not be persisted locally?

When users login from /login it's from a server component.
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

getSession() return null after login
SupabaseSSupabase / help-and-questions
4y ago
getSession returns null on the server
SupabaseSSupabase / help-and-questions
4y ago
data.session from supabase.auth.getSession() is always null.
SupabaseSSupabase / help-and-questions
4y ago
getSession initially returns null session, which leads to incorrect rendering
SupabaseSSupabase / help-and-questions
3y ago