Hello @nalawalaq welcome to the community!
The best way to go about this is to implement Role Based Access Control (RBAC) - You can have this enabled for your API you’ve registered in Auth0. The flow goes something like this:
- User authenticates at your web app and obtains an ID/access token.
- The access token is included as an
Authorization
header in requests to the API that you have registered in Auth0. - Your API validates the token and then checks the
permissions
claim, scopes, etc. depending on your specific needs.
I recommend taking a look at at the express-oauth2-jwt-bearer
library referenced in the following guide for validating tokens on your backend/API: