Auth0 Home Blog Docs

Why do I only get a subset of id_token where I should get more info?



I have followed Go quick start guide from here

and I am trying to get as much info about user as possible from id_token but somehow I am only getting a subset, namely:

decoded profile JSON from https:// + domain + /userinfo return only identity providers ID together with location (which I have programmed in Rules)
So something like:


while id_token (after decoding) gives only this:

exp - 1511508312.000000 - $COUNTRY - $TIMEZONE
iss -
sub - github|73XXXX
iat - 1511472312.000000

yet I am authenticating with the following URL:


There are a few possible explanation for something like that, in particular:

  1. the end-user in question does not have the associated properties in its user profile.
  2. you have a rule that is overriding the granted scopes and removes the email and profile scopes from the set of scopes granted as part of the authentication/authorization transaction.
  3. you customized the hosted login page in such way that the scopes sent in the initial request are being lost when continuing the authentication process. For example, not configuring Lock correctly in terms of consuming the config.internalOptions that are injected to the hosted login page.

Given you showed that you were trying with a GitHub end-user then that pretty much rules out option one as IIRC GitHub will return email information and other OIDC profile properties.

You can also quickly rule out option two by either ensuring no rule sets context.accessToken.scope or simply doing a quick test with all rules disabled.

Since the information you’re obtaining is consistent with the authentication request being completed as if only the openid scope had been requested and it’s unlikely that you set a rule that forces only the openid scope and would not remember of it I would say that option three would be the most likely.


Not setting config.internalOptions correctly was my case. Thanks again for brillitant support!