I have added a 'sign in with Google' button as per Google documentation

My HTML code is:

 <div id="g_id_onload" data-client_id="{{googleClientId}}" data-callback="handleCredentialResponse" data-use_fedcm_for_prompt="true"></div>
 <div class="g_id_signin" data-text="continue_with" ></div>

However when the user clicks the sign in button the error: Cross-Origin-Opener-Policy policy would block the window.postMessage call. shows The google docs say that setting data-use_fedcm_for_prompt to true should prevent these errors.

Any way I can stop these errors?

1

There are 1 best solutions below

0
hermz On

from the HTML code you attached, I assumed you are only using the Sign In with Google button. FedCM is specific for One Tap for now. To resolve the error messages, you should still the doc to set up your COOP header.