© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago
Satou kuzuma

getSession returns null on the server

I’m using the latest version of supabase on next js. After login I use router.push to redirect to the index page and you then I get session null. Do I need to set an api route for this to work? Do I still need to wrap the app with the nextjs auth helpers like when using getUseByCookie? There’s no much documentation with the new implementation so I’m not sure if I’m doing something wrong.
Thanks in advance !
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 initially returns null session, which leads to incorrect rendering
SupabaseSSupabase / help-and-questions
3y ago
getSession() is null after login?
SupabaseSSupabase / help-and-questions
3y ago
getSession() return null after login
SupabaseSSupabase / help-and-questions
4y ago
auth returns null on first call
SupabaseSSupabase / help-and-questions
4y ago