Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’4y agoβ€’
5 replies
b3n123

Multiple middleware auth

So my web app requires authentication to access all pages. There are also some pages which only admins can access (their role is defined in raw_app_meta_data).

Middleware seems the best way to achieve this but I'm unsure how to achieve this or if it's even possible since I think it would need 2 middleware files.

Would middleware be the best way forward or are there better ways?

Any help is appreciated πŸ™‚
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

Supabase Auth without middleware
SupabaseSSupabase / help-and-questions
4mo ago
multiple auth cookies
SupabaseSSupabase / help-and-questions
14mo ago
Auth in Page VS Auth in Middleware
SupabaseSSupabase / help-and-questions
4mo ago
Question regarding multiple auth
SupabaseSSupabase / help-and-questions
3y ago