# NextJS Example invalid JWT

**URL:** <https://community.auth0.com/t/nextjs-example-invalid-jwt/135316>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, nextjs-auth0\
**Created:** [May 30, 2024, 7:14pm UTC](https://community.auth0.com/t/nextjs-example-invalid-jwt/135316 "2024-05-30T19:14:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![firebelly](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/firebelly/32/57547_2.png) [@firebelly](https://community.auth0.com/u/firebelly)\
**Post date:** [May 30, 2024, 7:14pm UTC](https://community.auth0.com/t/nextjs-example-invalid-jwt/135316/1 "2024-05-30T19:14:47Z")

</div>

Ready to post? 🔍 First, try searching for your answer.  
I think I’m missing something here, but the quickstart at [Auth0 Next.js SDK Quickstarts: Add Login to your Next.js application](https://auth0.com/docs/quickstart/webapp/nextjs/interactive) works fine, but the bearer tokens that are created don’t seem to be valid JWT, they are JWE or something else. Is there any documentation on how to get the SDK to provide actual JWT?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 31, 2024, 10:22pm UTC](https://community.auth0.com/t/nextjs-example-invalid-jwt/135316/3 "2024-05-31T22:22:49Z")

</div>

Hey there @firebelly welcome to the community!

> [@firebelly](#):
>
> but the bearer tokens that are created don’t seem to be valid JWT, they are JWE or something else

The access token you’re getting back is most likely [opaque](https://auth0.com/docs/secure/tokens/access-tokens#opaque-access-tokens) as the quickstart doesn’t include an [audience](https://community.auth0.com/t/what-is-the-audience/71414) param.

You’ll need to pass an `audience` param in `authorizationParams`:

> <https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md#access-an-external-api-from-an-api-route>

---

<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:** [June 14, 2024, 10:23pm UTC](https://community.auth0.com/t/nextjs-example-invalid-jwt/135316/4 "2024-06-14T22:23:37Z")

</div>

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