Help with Clerk
I'm trying to protect multiple groups of routes and having a tough time. I've read the docs https://clerk.com/docs/references/nextjs/clerk-middleware#protect-multiple-groups-of-routes which works if I'm managing roles inside clerk. However, in my application I'm managing user roles in a firebase doc (users>[userId]>doc). In this doc, there are many attributes to the user but one of them is the "role" field which identifies the user role in the app. I want to protect groups of route in my app based on their role stored in firebase. How on earth do I do that? All the LLM assistants I use for coding help seem to not have the latest updated docs in their db so none of their suggestions work. Thank you
1
0 comments
Steven Barrow
3
Help with Clerk
University of Code
skool.com/universityofcode
You'll get Exclusive Lessons & Content, Badass Community Support & More here to elevate as a Dev!
Leaderboard (30-day)
powered by