© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
•
4y ago
•
3 replies
Bennett
Next.js helpers v2 - Get user or session on the server without HOF (`withPageAuth`)
Is there a way to get the user or session on the server
(e
.g
. a Next
.js API route
) from the cookie like in v1
.x
?
Before
, one could just do
await supabase.auth.api.getUserByCookie(req)
await supabase.auth.api.getUserByCookie(req)
, is there an alternative for v2
?
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
Using withPageAuth without a session
S
Supabase / help-and-questions
4y ago
Get user server-side on supabase js 2.0 + next.js
S
Supabase / help-and-questions
4y ago
Get user.id server-side in Next.js
S
Supabase / help-and-questions
4y ago
How to get user or session info on server side?
S
Supabase / help-and-questions
4y ago