Add username claim to jwt ID Token


I was trying to add a custom claim name “username” but I had an error saying that it’s reserved. So I checked in the documentation and found this : Reserved claims token hook

If this claim already exist how can we display it inside the ID Token, it is a need for an API to have this particular name. Or if you have any other idea feel free.

As you saw, you are unable to modify any of the listed reserved claims when using the token hook, however, just because a claim is included in this list, does not mean you will see it returned in every/any tokens issued. Any claim that you see labelled as reserved is not able to be overridden.

Alright so as I’m guessing there is no way to have it displayed in the ID token.

under the claim name ‘username’, regrettably no.

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