Auth0 Home Blog Docs

/userinfo only returns {sub}



The user was created with scope: openid, yet the GET operation on /userinfo with the bearer token only returns {sub}

Any idea what I could be missing?


When setting your scope, are you also passing the scope ‘profile’?


Thanks for the response, @jeremy1. So in the code below, add another scope?

export function login () {
    responseType: 'token id_token',
    redirectUri: REDIRECT,
    audience: AUDIENCE,
    scope: SCOPE


That worked!


Yep. Here’s some more information about scopes from Auth0:


I should clarify: it looks like you’re using typescript, and are pulling in a constant named SCOPE from some settings file. You would add profile (and any other scopes you want, space separated) to that constant value in your settings file.


Thanks jeremy. I had the same problem. It was solved by your answer. Save me a lot of time. Thanks :slight_smile:

auth0 = new auth0.WebAuth({
domain: AUTH_CONFIG.domain,
clientID: AUTH_CONFIG.clientId,
redirectUri: AUTH_CONFIG.callbackUrl,
audience: https://${AUTH_CONFIG.domain}/userinfo,
responseType: ‘token id_token’,
scope: ‘openid profile’ // add profile in the scope