For local testing with Auth0, what should the callback url be?
I wasn't able to find it in the docs, but have tried the following redirect url's (on the Auth0 project settings) with no success:
http://localhost:3000/callback, http://localhost:3000/login, http://localhost:3000/api/auth/callback, http://localhost:3000/
3 Replies
Hi @jawmes.. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the extracts, the redirect URL you should use in your Auth0 project settings is your application's origin URL. This is typically the root URL of your application, such as
<http://localhost:3000
.>
Here's how you can set it in your Auth0Provider
component:
In the code above, window.location.origin
returns the origin (root) URL of your application. This is the URL you should use as the redirect URL in your Auth0 settings.
For more detailed information, you can refer to the Auth0 documentation (https://auth0.com/docs/quickstart/spa/react#configure-auth0) and the refine documentation (https://refine.dev/docs/advanced-tutorials/auth/auth0/).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@632698368958791681> kapa.ai is still learning and improving, please let us know how it did by reacting below
conscious-sapphire•11mo ago
Whoops it should have been http://localhost:3000/api/auth/callback/auth0