© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago
sethtjf.

Nextjs + Auth best practice (data fetching)

auth
Is there a best practice for getting user data when checking auth in nextjs middleware? I followed the SSR docs, but my question is specifically the best way to get user data within a server component. I'm assuming that I need to do another getUser call, but this would be redundant since that is done in the middleware. Is there another way?
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

Best practice to protect users sensitive data
SupabaseSSupabase / help-and-questions
3y ago
autologin best practice
SupabaseSSupabase / help-and-questions
4y ago
what is considered best practice for authenticating an electron app through NextJS+Supabase Auth?
SupabaseSSupabase / help-and-questions
7mo ago
Supabase fetching/caching in nextjs
SupabaseSSupabase / help-and-questions
3w ago