Closed luciano-buono closed 8 months ago
Besides the fact that reading roles in the backend is an anti-pattern (except if used only for literal display purpose), instead of relying only on granular permissions, yes it's possible to extend, you're already done the python / fastapi part.
However, in order for that to work, you need to use auth0 actions to add the roles as custom claim to the jwt. A few lines of javascript code will be required in your auth0 console.
Hi, yes I have already done that Action Flow in the login for Auth0
I needed to extend not only Auth0User, also Auth0 class in my own file
I would like to extend your class Auth0 with an additional roles field, which I have added to my JWT The main goal is to be able to obtain this field from the JWT passed through the request