Auth0 Home Blog Docs

CORS origin error It doesn't matter what I do

i have tested thousands of solutions and none has worked for me to fix the CORS origin error, i have put in allowed web origins the localhost with its port, the auth0 personal address, https http, changing the callback, putting also in CORS origins all possible addresses, adding a proxy to the angular project and NOTHING works.

i don’t understand what i’m doing wrong, i followed step by step the getting started section

this is the error:

Access to XMLHttpRequest at ‘https://dev-*********.auth0.com/oauth/token’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The ‘Access-Control-Allow-Origin’ header has a value ‘https://localhost:4200’ that is not equal to the supplied origin.

Without the full configuration of the client application these sort of issues can be complex to troubleshoot. You mention that you already tried a lot of things including HTTP vs HTTPS, but the error message you showed states that the origin is different and is different because the application is running in HTTP and the server is allowing CORS for HTTPS.

Without any changes to the client application settings what happens if you the application with HTTPS? (localhost and same 4200 port)

thank you for the help, it seems that creating the certificates and putting https works, I do not understand why it did not work with http, but good