# Receiving JWE token instead of JWT in Next.js app session

**URL:** <https://community.auth0.com/t/receiving-jwe-token-instead-of-jwt-in-next-js-app-session/167855>\
**Category:** JWT.io\
**Tags:** jwt, react, token, unexpected-token, nextjs, auth0\
**Created:** [January 8, 2025, 4:17am UTC](https://community.auth0.com/t/receiving-jwe-token-instead-of-jwt-in-next-js-app-session/167855 "2025-01-08T04:17:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rsacks](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rsacks/32/65019_2.png) [@rsacks](https://community.auth0.com/u/rsacks)\
**Post date:** [January 8, 2025, 5:44am UTC](https://community.auth0.com/t/receiving-jwe-token-instead-of-jwt-in-next-js-app-session/167855/2 "2025-01-08T05:44:54Z")

</div>

This previous post: [Requesting accessToken not returning a valid JWT - #2 by markd](https://community.auth0.com/t/requesting-accesstoken-not-returning-a-valid-jwt/78958/2) …seems to imply the JWE is just an “opaque token” (if this is correct, the docs could help us less experienced folks out by connecting these dots). Adding the env var to my .env.local seems to have gotten me past this issue.

However, other docs say I need this (e.g. [Why Access Token Is Not a JWT (Opaque Token)](https://community.auth0.com/t/why-access-token-is-not-a-jwt-opaque-token/31028) _“To receive a JWT, the token request must include an audience parameter.”_) but adding it doesn’t seem to do anything new. The env var alone seems to work (to at least get me past this initial issue):

```auto
export const GET = handleAuth({
	login: handleLogin({
		authorizationParams: {
			audience: process.env.AUTH0_AUDIENCE,
			scope: 'openid profile email',
		},
        ...

```

---

_[View the full topic](https://community.auth0.com/t/receiving-jwe-token-instead-of-jwt-in-next-js-app-session/167855)._
