# Integrating Auth0 with NextJS (Not working)

**URL:** <https://community.auth0.com/t/integrating-auth0-with-nextjs-not-working/125846>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [January 27, 2024, 3:14pm UTC](https://community.auth0.com/t/integrating-auth0-with-nextjs-not-working/125846 "2024-01-27T15:14:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michel.bouchet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michel.bouchet/32/54318_2.png) [@michel.bouchet](https://community.auth0.com/u/michel.bouchet)\
**Post date:** [January 27, 2024, 3:14pm UTC](https://community.auth0.com/t/integrating-auth0-with-nextjs-not-working/125846/1 "2024-01-27T15:14:49Z")

</div>

While following this document ([Auth0 Next.js SDK Quickstarts: Add Login to your Next.js application](https://auth0.com/docs/quickstart/webapp/nextjs/interactive)) to try to integrate Auth0 to my NextJS app, I get this problem:

Oops!, something went wrong

Callback URL mismatch.  
The provided redirect\_uri is not in the list of allowed callback URLs.  
And when clicking: See details for this error

I see this:

unauthorized\_client: Callback URL mismatch. [https://nive-123abc](https://nive-123abc)…herokuapp.com/Channels\_Pool/api/auth/callback is not in the list of allowed callback URLs

The strange thing is that though I know of Channels\_Pool, this is not part of anything I have set up as a callback URLs or anything related to Auth0. So I do not understand why it mysteriously appear in this error and where it is coming from.

Also, what is this “provided redirect\_uri” ? I am not aware of providing such a thing.

I am looking for an idea on how to tackle the problem.

---

<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:** [January 30, 2024, 1:24am UTC](https://community.auth0.com/t/integrating-auth0-with-nextjs-not-working/125846/3 "2024-01-30T01:24:56Z")

</div>

Hello @michel.bouchet welcome to the community!

> [@michel.bouchet](#):
>
> Oops!, something went wrong
> 
> Callback URL mismatch.  
> The provided redirect\_uri is not in the list of allowed callback URLs.  
> And when clicking: See details for this error

This error is typically spot on - In the case of the quickstart/sample app `http://localhost:3000/api/auth/callback` needs to be [added as an Allowed callback url](https://auth0.com/docs/authenticate/login/redirect-users-after-login#redirect-users-to-callback-urls-on-the-allowlist) in the application settings oft he application you created for the NextJS app.

> [@michel.bouchet](#):
>
> The strange thing is that though I know of Channels\_Pool, this is not part of anything I have set up as a callback URLs or anything related to Auth0. So I do not understand why it mysteriously appear in this error and where it is coming from.

Are you attempting to host the app or running locally as in the sample?

> [@michel.bouchet](#):
>
> Also, what is this “provided redirect\_uri” ? I am not aware of providing such a thing.

The `redirect_uri` in the case of the sample is `http://localhost:3000/api/auth/callback` - It is the url which user’s are redirected to in your application upon successful auth.

---

<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:** [February 13, 2024, 1:25am UTC](https://community.auth0.com/t/integrating-auth0-with-nextjs-not-working/125846/4 "2024-02-13T01:25:32Z")

</div>

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