# Email not included in JWT access token payload

**URL:** <https://community.auth0.com/t/email-not-included-in-jwt-access-token-payload/185902>\
**Category:** Get Help\
**Tags:** free-trial, new-universal-login-experience, login-experience\
**Created:** [April 24, 2025, 2:42pm UTC](https://community.auth0.com/t/email-not-included-in-jwt-access-token-payload/185902 "2025-04-24T14:42:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolatesla0987](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolatesla0987/32/71200_2.png) [@nicolatesla0987](https://community.auth0.com/u/nicolatesla0987)\
**Post date:** [April 24, 2025, 2:42pm UTC](https://community.auth0.com/t/email-not-included-in-jwt-access-token-payload/185902/1 "2025-04-24T14:42:40Z")

</div>

Hello,

I am having an issue. i have added the email scope but still the user email is not included in JWT access token payload

i am using next.js in frontend where i am getting the token  
this is how i am handling my login in next api routes

```auto
import { handleAuth } from '@auth0/nextjs-auth0';

if (
  !process.env.AUTH0_BASE_URL ||
  !process.env.AUTH0_SECRET ||
  !process.env.AUTH0_ISSUER_BASE_URL ||
  !process.env.AUTH0_CLIENT_ID ||
  !process.env.AUTH0_CLIENT_SECRET
) {
  throw new Error('Missing Auth0 environment variables');
}

// Note: We do not use `params` in this route handler. The warning can be ignored.

export const GET = handleAuth();
export const POST = handleAuth();
export const PUT = handleAuth();
export const DELETE = handleAuth();

```

and in the backend i am using nest.js  
this is my JWT strategy in my backend

```auto
@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy) {
  constructor() {
    super({
      secretOrKeyProvider: jwksRsa.passportJwtSecret({
        cache: true,
        rateLimit: true,
        jwksRequests PerMinute: 5,
        jwksUri: `${process.env.AUTH0_ISSUER_BASE_URL}.well-known/jwks.json`,
      }),
      jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), // Use our custom extractor
      audience: process.env.API_ENDPOINT, // must match one value in the token's "aud" array
      issuer: process.env.AUTH0_ISSUER_BASE_URL, // must match token's "iss"
      algorithms: ['RS256'],
    });
  }

  async validate(payload: any) {
    return payload;
  }
}

```

JWT access token payload

```auto
{
  "iss": "https://dev-ba1x5rok53uuqkl0.us.auth0.com/",
  "sub": "auth0|6808ca7135629091a4429fa8",
  "aud": [
    "http://localhost:8080",
    "https://dev-ba1x5rok53uuqkl0.us.auth0.com/userinfo"
  ],
  "iat": 1745503663,
  "exp": 1745590063,
  "scope": "openid profile email",
  "azp": "M2uAyZhg5X9ecdWiKiYp0PP47NVXNOnD"
}

```

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 24, 2025, 7:14pm UTC](https://community.auth0.com/t/email-not-included-in-jwt-access-token-payload/185902/3 "2025-04-24T19:14:33Z")

</div>

Hi @nicolatesla0987,

Thanks for you question.

I have answered your question in [this thread](https://community.auth0.com/t/auth0-with-next-js-is-not-working-with-nest-js/185754/5).

**TLDR:**  
Essentially, you can find the `email_address` and `email_verified` claims in the ID token rather than the access token. This is mentioned in our [Sample Use Cases: Scopes and Claims](https://auth0.com/docs/get-started/apis/scopes/sample-use-cases-scopes-and-claims#:~:text=Extract%20the%20ID,the%20following%20claims%3A) documentation.

If you want them to be in the access token, you might try [appending them as custom claims](https://community.auth0.com/t/adding-custom-claims-to-tokens/84590).

Cheers,  
Rueben

---

<div class="post-metadata">

**Author:** ![nicolatesla0987](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolatesla0987/32/71200_2.png) [@nicolatesla0987](https://community.auth0.com/u/nicolatesla0987)\
**Post date:** [April 25, 2025, 11:50am UTC](https://community.auth0.com/t/email-not-included-in-jwt-access-token-payload/185902/4 "2025-04-25T11:50:52Z")

</div>

I have added openId and email scope but still not getting the email in the payload

as you can see i have added openId and email in my scopes but still there is no email in the payload

```auto
export const GET = handleAuth({
  login: handleLogin({
    authorizationParams: {
      scope: 'openid profile email',
    },
  }),
});

```

JWT Payload

```auto
{
  "iss": "https://dev-ba1x5rok53uuqkl0.us.auth0.com/",
  "sub": "google-oauth2|102581212202536419417",
  "aud": [
    "http://localhost:8080",
    "https://dev-ba1x5rok53uuqkl0.us.auth0.com/userinfo"
  ],
  "iat": 1745581754,
  "exp": 1745668154,
  "scope": "openid profile email",
  "azp": "M2uAyZhg5X9ecdWiKiYp0PP47NVXNOnD"
}

```

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 25, 2025, 6:08pm UTC](https://community.auth0.com/t/email-not-included-in-jwt-access-token-payload/185902/5 "2025-04-25T18:08:33Z")

</div>

Hi @nicolatesla0987,

Thanks for your response.

The decoded token you shared looks like an access token payload claims.

Have you made sure you are decoding the ID token?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 9, 2025, 6:09pm UTC](https://community.auth0.com/t/email-not-included-in-jwt-access-token-payload/185902/6 "2025-05-09T18:09:11Z")

</div>

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