After authenticating with Google in my React.js (CRA) app, I get the following error in the console:
Cross-Origin-Opener-Policy policy would block the window.postMessage call. I tried to fix it by adding the following headers in my serve.json file:
{
"rewrites": [
{
"source": "*",
"destination": "/index.html"
}
],
"headers": [
{
"source": "*",
"headers": [
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin-allow-popups"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "unsafe-none"`enter code here`
}re ]
}
]
}
But it doesn't help — I still get the same error.
Is there any working solution for this?