Ready to post? First, try searching for your answer.
How can I restrict a all users which is not of Role Admin to the /admin page?
Hello @hallv-a welcome to the community!
It really depends on your specific app architecture, but in general you’ll want to look into implementing Role Based Access Control (RBAC) - At the application level (node backend for example) Auth0 provides SDKs to aid in validating a user’s access token and checking for specific claims (in this case a user’s role):
Sorry, forgot som important parts: I want to use next.js on the frontend and have some backend with a .net core C# for api. The admin page is to edit products, discounts, subscriptions and general settings. Any additional comments?
In that case I recommend checking out the next.js quickstart for login, RBAC still applies. For validating access tokens you’ll want to check to see if any library may suit your needs at jwt.io. The code samples here may prove useful as well.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.