I am attempting to set up an auth0 integration with node.js backend and next.js frontend. The node backend uses the express-openid-connect library.
When encountering a logged-out user, the node server redirects the frontend to /authorize’, which is rejected due to CORS policy.
Things I have tried:
CORS issue using /authorize endpoint
Used localho.st:3000 instead of localhost:3000 to get around the issue, still fails
CORS error when calling /authorization from React app
I have confirmed that the state parameter is present. The URL works when you load it in the browser, it only fails due to CORS.
CORS issues on localhost
I am not using XMLHttpRequest, but redirecting instead
I am using Universal Login, and I do not have a custom domain present in my tenant. This is a development environment only.
It seems like users have been having this problem for many years and it hasn’t been fixed API being blocked by CORS even though it's an allowed origin