Friday 30 June 2023

Google Sign-In Not Working in Next.js with Firebase due to Cross-Origin-Opener-Policy Error

I am developing a web application using Next.js and Firebase. I have successfully implemented Google sign-in in my application, but I've encountered an issue which is preventing the sign-in process from completing as expected.

When I attempt to sign in, a popup window appears as intended. However, in the console, I see the following error:

Cross-Origin-Opener-Policy policy would block the window.closed call.

Because of this error, the sign-in process doesn't complete and the user is not properly signed in.

Some further context: I'm testing this functionality in a development environment, on localhost. The issue is active on Chrome, but not on Firefox.

Could this error be due to a misconfiguration of the Cross-Origin-Opener-Policy? If so, how can I correctly configure this policy for Google Sign-in with Firebase in a Next.js application?

enter image description here



from Google Sign-In Not Working in Next.js with Firebase due to Cross-Origin-Opener-Policy Error

No comments:

Post a Comment