Integrating Auth0 with NextJS (Not working)

While following this document (Auth0 Next.js SDK Quickstarts: Add Login to your Next.js application) 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…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.

Hello @michel.bouchet welcome to the community!

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 in the application settings oft he application you created for the NextJS app.

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

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.

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