I had auth0 setuped and it was working fine after migrating the server without any change to file or database similar to cloning the server the auth 0 is not working on website. It is giving an error which I am unable to resolve. Can anyone please have a look and help. The error is as below
There was a problem with your log in: Error exchanging code [error code: unknown]
← Login
Hi @weesaalcummar, and welcome to the Auth0 Community!
This error almost always means that the new, cloned server’s URL doesn’t match what Auth0 has on file. When you migrated the server, its address (domain or IP) likely changed, and now Auth0 is rejecting the login attempt as a security measure.
To fix this, you need to update the URLs in your Auth0 Application settings to reflect your new server’s address.
- Go to your Auth0 Dashboard.
- In the left menu, navigate to Applications > Applications.
- Select the Application that is used for your website.
- Go to the Settings tab.
- Scroll down to the Application URIs section. This is where you need to make the changes.
- Allowed Callback URLs: This is the most critical setting. Add the full URL where Auth0 should redirect users after they log in.
- Allowed Logout URLs: Add the URL where Auth0 should redirect users after they log out.
- Allowed Web Origins: Add the base URL of your new server to this list.
- Scroll to the bottom of the page and click Save Changes.
I hope this helps you!
Sincerely,
Teodor.