Auth0 Home Blog Docs

Callback urls

callback-urls
callbacks

#1

I am running the sample React tutorial app (01 Login). When I attempt to click the Log In button, I get an error:

Callback URL mismatch. The url
"http://localhost:3000/callback" is
not in the list of allowed callback
URLs: http://localhost.com:3000/,
http://localhost.com/callback.

I have checked my client ID and it is correct. It seems odd that it is telling me that the callback url is not in the list of callbacks, then when it shows the list of allowed callbacks the url is there. What am I missing?


#2

It would indeed be odd, but they are only similar; you’re specifying a callback URL different than any of the configured ones.

More specifically, you specify a hostname of localhost, but both the allowed callback URL’s use a hostname of localhost.com. Remove the .com suffix and ensure the correct port and it should work.


#3

Ha. Very silly miss. Thanks, it’s all better now.


#4

I found the solution in https://stackoverflow.com/questions/40824963/getting-callback-url-mismatch-with-auth0/46767040#46767040


#5