Stop Nickname and Picture Claims Being Displayed In Id Token

Hi Auth0 Community

We’re using a custom database script to return user information.

We have created an api and added relevant permissions

When we are calling the /authorize endpoint, we are including the following scopes:

openid, profile, read:customer, update:customer in the scope query parameter and setting the audience query parameter to the audience value of the api.

The fact I have added the profile scope will give me access to name, nickname and picture in the ID token. If the JSON I return to Auth0, from the custom database script, has nickname and picture as blank or null, Auth0 is setting the nickname to the value of name and creating an picture based on the first characters of the firstname and lastname in the name field.

I only want to display the name attribute. Is this possible?

(I appreciate I could add a field to the app_metadata add create a custom claim with a namespace, using an action script in the Login flow to add the custom claim to the ID Token)


I’ve found a solution/work around

I’ve created a rule based on the Remove attributes from user template, so now the nickname and picture claims are removed from the ID token (Yes I know rules are being deprecated :grin:)



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