Auth0 Home Blog Docs

Custom claims to the Access Token

i want to get metadata from auth0.client.userInfo
can any one help me
what scope i should do and what steps in details

You would add these to the ID token via Rules. There is no predefined scope for user_metadata.

See the example on

You can of course add a logic that you only add the custom claims if a certain scope is requested, where you can name the scope anything you like.

if (context.request.query.scope.split(" ").indexOf("user_metadata")>=0) {  
  context.idToken['https://mynamespace/user_metadata'] = user.user_metadata;
}
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.