© 2026 Hedgehog Software, LLC

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

How to get user or session info on server side?

Hello,
I am trying to build auth system base on the supabase auth but I have a lot of problems
after I signed in successeflly I checked my cookies and got two cookies "sb-refresh-token & sb-access-token" but they are assined to my supabase gotrue server url not my project url eg: localhost
so that when i tryied to access a server side page and pass the req & res to createServerSupabaseClient();
then tryied to fetch session or user info it is always return null when I come back to check my cookies It disappers when I search more about it I found out that happend because of the cookies is assiend to the gotrue url not my app url
So how to solve this hole problem and able to check my user session or info in server?
image.png
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

Get session data server side
SupabaseSSupabase / help-and-questions
4y ago
How to get current user data server side (next.js middleware)
SupabaseSSupabase / help-and-questions
4y ago
Next.js helpers v2 - Get user or session on the server without HOF (`withPageAuth`)
SupabaseSSupabase / help-and-questions
4y ago
I can't retrieve a the current user or session on the server side in Nextjs
SupabaseSSupabase / help-and-questions
11mo ago