© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
5 replies
Maks

Supabase Auth with SSR package and Express

Hi all!
I'm trying to implement this functionality https://supabase.com/docs/guides/auth/server-side/creating-a-client?framework=express&environment=server-client

For some reason, when pass
res, req
res, req
from Express as context, it responds with this error:

TypeError: Cannot read properties of undefined (reading 'sb-endpabgnoldzrglfjjes-auth-token')
const cookie = cookies[key] ?? '';
TypeError: Cannot read properties of undefined (reading 'sb-endpabgnoldzrglfjjes-auth-token')
const cookie = cookies[key] ?? '';


i identified that in this line returns undefined:
const cookies = context.req.cookies;

Does anyone have any idea why? Has anyone implemented it yet?

P.S. Does it make sence to use SSR package for server side auth at all, instead of supabasejs?
Creating a Supabase client for SSR | Supabase Docs
Configure Supabase client to use Cookies
Creating a Supabase client for SSR | Supabase Docs
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

NestJS with Supabase Auth SSR package
SupabaseSSupabase / help-and-questions
3y ago
ssr package buggy with auth
SupabaseSSupabase / help-and-questions
14mo ago
auth-helpers vs @supabase/ssr
SupabaseSSupabase / help-and-questions
3y ago
session with @supabase/ssr
SupabaseSSupabase / help-and-questions
3y ago