The /userinfo resta-pi is returning a different response

The /userinfo api is returning a different response ( then promised )

I am sharing the api response I am getting :

This is what I was promised :

The most likely reason for you only obtaining the sub claim in the response is that your application is only including scope=openid when starting the OIDC authentication request.

For OIDC compliant requests that endpoint will return the standard claims associated with the scopes that were requested (see Final: OpenID Connect Core 1.0 incorporating errata set 1). In other words, if you update the client application to request scope=openid profile email youā€™ll receive additional information.

Having said all of that I understand that the documentation for that endpoint could be much more clearer and the response sample could also be made inline to the now common scenario where requests are following the OIDC specification; Iā€™ll report this to the documentation team.

1 Like

Hi @jmangelo ,
So how should I send this ā€œscopeā€ ?
As parameters in a GET-REQUEST?
OR
In body as json (POST-REQUEST)
OR
in headers ?? (GET )
Please point me towards the right direction in docs .

Hi @jmangelo ,
I was able to get the required user-data , using the scope: ā€˜openid email profileā€™ , in the auth0.WebAuth() method .

Are there any other scopes that I can use ?

What I got back from /userinfo : {
ā€œsubā€: ā€œgoogle-oauth2|2575749834579325793257ā€,
ā€œgiven_nameā€: ā€œappleā€,
ā€œfamily_nameā€: ā€œappleā€,
ā€œnicknameā€: ā€œapple_incā€,
ā€œnameā€: ā€œApple Appleā€,
ā€œpictureā€: ā€œhttps://lh5.googleusercontent.com/-apple/photo.jpgā€,
ā€œlocaleā€: ā€œenā€,
ā€œupdated_atā€: ā€œ2019-01-01T07:10:31.450Zā€,
ā€œemailā€: ā€œuser@gmail.ukā€,
ā€œemail_verifiedā€: true
}

Thanks ā€¦

As mentioned in the previous link OpenID Connect also specifies the scopes address and phone.

1 Like

Thanks for the quick response @jmangelo ā€¦
Happy day.

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