**"error": {
"message": "Callback URL mismatch. https://'http://localhost:3000'/api/auth/callback is not in the list of allowed callback URLs",
"oauthError": "Callback URL mismatch. https://'http://localhost:3000'/api/auth/callback is not in the list of allowed callback URLs. Please go to 'https://manage.auth0.com/#/applications/Y3r9QBWuQ0SVYRp0qoIAWywctOBJQSmi/settings' and make sure you are sending the same callback url from your application.",
"payload": {
"message": "Callback URL mismatch. https://'http://localhost:3000'/api/auth/callback is not in the list of allowed callback URLs",
"code": "unauthorized_client",
"status": 403,
"name": "CallbackMismatchError",
"authorized": [
"http://localhost:3000/api/auth/callback"
],
"attempt": "https://'http://localhost:3000'/api/auth/callback",
"log_url": "https://manage.auth0.com/#/logs/"
},
"type": "callback-url-mismatch"
}
},**
Hi @Emmanueluzoezie ,
Welcome to the Auth0 Community!
Based on the error message,
message": “Callback URL mismatch. https://‘http://localhost:3000’/api/auth/callback
is not in the list of allowed callback URLs”,
Your code prepends an additional https:// and the http://localhost:3000 is quoted. I suggest you check your scripts to make sure the callback URL matches that’s configured in the setting, that is, http://localhost:3000/api/auth/callback.
Hope this helps!
Thanks for your feedback but please how can i check my script, because am using the default configuration provided by Auth0.
here’s is the only code i wrote
import { handleAuth } from '@auth0/nextjs-auth0';
export default handleAuth()
I suggest you capture the complete login event as a HAR file and check from there.
If you could DM the HAR file to me, I will look into this further.
Hi @Emmanueluzoezie ,
I tested the sample Auth0 Next.js Regular Web App and could log in successfully.
Here are the steps I did:
- Create a Next.js Regular Web App.
- Downloading the sample code from the quick start
- Go to the project folder:
a. runnpm install @auth0/nextjs-auth0
b. run theopenssl rand -hex 32
on the command line to generate a 32-bit long random value and add it to theAUTH0_SECRET
field in the.env.local
file
c. in the.env.loca
l file, AUTH0_BASE_URL = http://localhost:3000, instead of AUTH0_BASE_URL = ‘http://localhost:3000’
c. runnpm run dev
Hope the details help!