1
votes

I just launched a React app on Netlify. I have an issue with my Auth0 integration in the app. In Auth0, I've added my custom domain name to the list of allowed callback URLs, but I get an error when I try to sign in, saying:

Callback URL mismatch.
The URL "https://<blah long url here>.netlify.com/callback" is not in the list of allowed callback URLs.

I've tried adding that URL, but then on sign in, the app actually redirects to that long Netlify URL instead of my custom domain. Anyone know a way around this?

1
Are you looking for the authorization callback?talves
Auth0 Dev Here, can you check what you are passing as the redirectUri / callbackUrl in the application? It seems that the application is sending this as a callbackUrl instead of your custom domain url.ShrekOverflow
@ShrekOverflow that was the issue! Thanks. And nice username.Jon Sanders
@ShrekOverflow, please feel free to leave your comment as an answer so I can accept it!Jon Sanders

1 Answers

2
votes

Disclosure: I work for Auth0.

From the error it seems that the application is sending https://APP_ID.netlify.com/callback as a callbackUrl instead of your custom domain url. You'll need to set your custom domain as your callbackUrl in Auth0.js' (or our other SDKs) redirectUri instead of the https://APP_ID.netlify.com/callback when using custom domains!