Can't get email from id_token

I face the same issue since a couple of days. Everything was fine last week, but by now, I only retrieve sub, email, verified_email through access_token based profile authentication.

Steps to reproduce:

First, create WebAuth object.

  webAuth = new auth0.WebAuth({
    domain: AUTH_CONFIG.domain,
    clientID: AUTH_CONFIG.clientID,
    redirectUri: AUTH_CONFIG.redirectUri,
    audience: `https://${AUTH_CONFIG.domain}/userinfo`,
    responseType: 'token id_token',
    scope: 'openid profile' // name email picture user_metadata app_metadata   });

Then, login

    this.webAuth.authorize();

Retrieve access_tocken and user profile

const accessToken = this.getAccessToken();
log.info(`getProfile:accessToken: ${accessToken}`);
this.webAuth.client.userInfo(accessToken, (err, profile) => {
  if (profile) {
    log.info('userProfile: ' + JSON.stringify(profile));
    this.userProfile = profile;
  }
  cb(err, profile);
});

And profile only contains 3 keys: sub, email, verified_email …

1 Like