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.