ยฉ 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
โข
7mo ago
โข
1 reply
riccardolardi
Nextjs Pages Router & @supabase/ssr: how to get session in middleware
We
're on Nextjs Pages Router but recently upgraded from auth
-helpers to
@supabase
/ssr
. We don
't seem to be able to get the user session in middleware anymore and the docs don
't show which client to use in middleware
:
https://supabase.com/docs/guides/auth/server-side/nextjs?queryGroups=router&router=pages
Is it not possible at all
? Should we protect pages on each pages level instead
?
Setting up Server-Side Auth for Next.js | Supabase Docs
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
@supabase/ssr signout nextjs app-router
S
Supabase / help-and-questions
3y ago
session with @supabase/ssr
S
Supabase / help-and-questions
3y ago
Supabase SSR + Middleware + HttpOnly Cookies?
S
Supabase / help-and-questions
5mo ago
nextjs + supabase auth, how to persist user session?
S
Supabase / help-and-questions
4y ago