admin管理员组

文章数量:1277895

Intermediate programmer here! I’m making an app with auth0 login. Unfortunately, after I made the mode of it to production mode, I can’t seem to login, even though I enter the correct details of my Google account. There is no red indicator in the browser in the upper left corner, as I deleted all social connections, except for the Google one. I also tried logging in with my email, and it loads for an infinite amount of time. When I try Google, I click sign in, and it loads forever as well. I have created a Google cloud project, so everything is fine there, so I have no idea what is wrong. What to do? All my callbacks and cross-roigins are correct, as in dev mode, it works. My project structure

The env.local has a AUTH0_BASE_URL='http://localhost:3000' If I use production settings, it doesn't work, any ideas why? I literally spent hours, but people who signed up for my app want to use it, and it just redirects them back to the website. Here's the example:

/

The errors in the browser console are like this:

market-share-chart.sketchthread/:1 Access to fetch at '…nge_method=S256&code_challenge=OtJl67lo2XEjGsTwuvifCfjMfzqL2I_TgbLdw0CmNTs' (redirected from '') from origin '' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Even though I clearly set the CORS origin on my auth0 app: Auth0 callback urls/ origins and other setup

Thanks, Antoni

本文标签: nextjsProduction mode Auth0 not working vs Dev mode Auth0 workingStack Overflow