© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
24 replies
b3n123

Permission based withPageAuth

Hi, I'm trying to restrict certain pages to users meeting a certain criteria. I've got 'withPageAuth' working for logged in users and I've read that if you use middleware you can check the user's email if it ends in a certain domain.

I can't get this to work as it allows all logged in users and it not restricting. I'm not using typescript so is that the issue? I'm not getting any errors so any help would be much appreciated. Thanks in advance.
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

withPageAuth Dynamic Page
SupabaseSSupabase / help-and-questions
4y ago
Using withPageAuth without a session
SupabaseSSupabase / help-and-questions
4y ago
withPageAuth, user is always undefined
SupabaseSSupabase / help-and-questions
4y ago
withPageAuth user undefined for authenticated user
SupabaseSSupabase / help-and-questions
4y ago