© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
19 replies
Mozes

getSession() return null after login

Hello I am building auth system in my app and i wanted to access getSession() on server I used the code snippet in the docs (https://supabase.com/docs/guides/auth/auth-helpers/nextjs#server-side-rendering-ssr)
But when the user login and tried to access the protected route it the session return null how to solve this problem?
image.png
Supabase Documentation
Supabase Auth with Next.js
Authentication helpers for Next.js API routes, middleware, and SSR.
Supabase Auth with Next.js
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() is null after login?
SupabaseSSupabase / help-and-questions
3y 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 does not return a response - No http call
SupabaseSSupabase / help-and-questions
8mo ago