Issue with userinfo Endpoint and Claims Request

Hello,

I hope someone can assist me with the following issue: Currently, I am encountering a problem where I only receive “preferred_username” when making a request to the userinfo endpoint. However, I am requesting both “picture” and “preferred_username” when authorizing.

Here is the response from the userinfo endpoint:

{“aud”:“xxxxxx”,“exp”:xxxxxx,“iat”:xxxxxx,“iss”:“https://id.twitch.tv/oauth2",“sub”:“xxxxxx”,“azp”:“xxxxxx”,“preferred_username”:"zaveit_test”}

I followed the guidance provided in the Twitch documentation on getting claims information from an access token:

This is my Claims Request, which includes the “picture” claim:

https://id.twitch.tv/oauth2/authorize?response_type=code&client_id=xxxxxx&state=Y1JpNVZhd2ZCUkZCMjZUOEhmT3NuMW96SVZraGVjNEkueFUyS3hoLk0tNUNu&redirect_uri=http%3A%2F%2Flocalhost%3A4200%2F%23%2Fmain%2Ftwitch-callback&scope=openid&code_challenge=7v-tvk-dpbGwFJ5cf21Kf2ZHZqVpHf942QSOpSMpdHg&code_challenge_method=S256&nonce=Y1JpNVZhd2ZCUkZCMjZUOEhmT3NuMW96SVZraGVjNEkueFUyS3hoLk0tNUNu&claims=%257B%2522userinfo%2522%253A%257B%2522picture%2522%253Anull%252C%2522preferred_username%2522%253Anull%257D%257D

I would appreciate any assistance in resolving this issue.

I couldn’t replicate an issue using my own “test” version - https://github.com/BarryCarlyon/twitch_misc/tree/main/authentication/oidc_authentication

I modified locally to just do the name/picture claims
And checked with an account that hasn’t assigned a custom profile

Edit: your copy/paste of the info from my info shows a AZP but myinfo does not return the AZP

AZP is only in the JWT itself not the JSON response from the myinfo endpoint

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