Getting user role upon login

Hello, I have a “role” value set in the “app_metadata” of my users. I would like to get this role when the user logs in. How may I do so using auth0.js?

You can pass the `role` back as a claim in the `id_token`. Take a look at the following document which outlines returning custom claims:

https://auth0.com/docs/api-auth/tutorials/adoption/scope-custom-claims

1 Like