Auth0 Home Blog Docs

The /userinfo resta-pi is returning a different response

userinfo
rest-api
#1

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 :

#3

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 https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). 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
#4

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 .

#5

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 …

#6

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

1 Like
#7

Thanks for the quick response @jmangelo
Happy day.

closed #8

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