Welcome Guest, Not a member yet? Register   Sign In
CORS policy Ci4
#2

I think the problem comes from Google and not from your app. It says to register your domain for your client ID and to register this origin for this client ID...
My guess is when your test from localhost, Google let it pass because it's a dev environment. But on a live site they're more strict with security.


sign-in:1 Access to XMLHttpRequest at 'http://api.testerdemo.ir/public/api/auth/logout' from origin 'http://www.testerdemo.ir' 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.
api.testerdemo.ir/public/api/auth/logout:1 Failed to load resource: net::ERR_FAILED

2828907236-idpiframe.js:172 GET https://accounts.google.com/o/oauth2/iframerpc?action=checkOrigin&origin=http%3A%2F%2Fwww.testerdemo.ir&client_id=clientId 401

main.5ad2075b22ce5575afdc.js:1 {
details: "Not a valid origin for the client: http://www.testerdemo.ir has not been registered for client ID clientId. Please go to https://console.developers.google.com/ and register this origin for your project's client ID." 
error: "idpiframe_initialization_failed"
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
CORS policy Ci4 - by paliz - 07-11-2021, 12:31 PM
RE: CORS policy Ci4 - by includebeer - 07-12-2021, 07:19 AM
RE: CORS policy Ci4 - by paliz - 07-12-2021, 09:58 AM
RE: CORS policy Ci4 - by paliz - 07-12-2021, 11:01 AM
RE: CORS policy Ci4 - by paliz - 07-12-2021, 06:30 PM
RE: CORS policy Ci4 - by includebeer - 07-13-2021, 10:49 AM
RE: CORS policy Ci4 - by paliz - 07-13-2021, 11:58 AM
RE: CORS policy Ci4 - by paliz - 07-13-2021, 01:02 PM
RE: CORS policy Ci4 - by includebeer - 07-13-2021, 01:49 PM
RE: CORS policy Ci4 - by paliz - 07-13-2021, 01:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB