As the title says, I have a NextJS webapp, and I’m trying to call the Auth0 Management API to get user roles.
The NextJS webapp is an Auth0 REGULAR WEB APPLICATION and I am able to get an Auth0 Management API token. Is there a best practice to this kind of use case?
Pass it where? The access token isn’t issued until after rules are completed, since rules could change the claims of the token.
From our docs, about what context.accessToken is:
An object representing the options defined on the Access Token. You can use this object to add custom namespaced claims to the Access Token. context.accessToken.scope can be used to change the Access Token’s returned scopes. When provided, it is an array containing permissions in string format. Custom claims will be included in the Access Token after all rules have run.