React Google Login: Cross-Origin-Opener-Policy Error and Popup Closure Issue

162 views Asked by At

I'm facing an issue with the React Google Login component, and I would appreciate your help in resolving it. When using the Google login button in my React app, I encounter the following errors:

cb=gapi.loaded_0?le=scs:175 Cross-Origin-Opener-Policy policy would block the window.closed call.

cb=gapi.loaded_0?le=scs:175 Cross-Origin-Opener-Policy policy would block the window.closed call.

Here are the steps leading to the issue:

I click the Google login button. The Google login popup appears. After successfully logging in, there is a loader for a couple of seconds. The Google login popup closes by itself. I'm unsure about the root cause of the Cross-Origin-Opener-Policy error and the unexpected closure of the popup. I have checked for common issues like CORS configurations and authorized redirect URIs, but the problem persists.

Environment:

React version: 18.2.0

Browser: google chrome, edge,firefox

react-google-login version: 5.2.2

also when i first start the app i get two warnings and a object

An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.

Third-party cookie will be blocked. Learn more in the Issues tab.

and this object

Object details : "You have created a new client application that uses libraries for user authentication or authorization that are deprecated. New clients must use the new libraries instead. See the Migration Guide for more information." error : "idpiframe_initialization_failed" [[Prototype]] : Object

0

There are 0 answers