Google Earth ee.data.authenticateViaPopup is blocked by persistent pop-ups
P粉124890778
P粉124890778 2023-08-18 14:14:26
0
1
443
<p>When I implement the example of Google Authentication in the Google Earth JavaScript API, the popup login window is blocked and the following message is displayed on the console: </p> <p>Cross-Origin-Opener-Policy policy will prevent window.closed calls. Lv @ cb=gapi.loaded_0?le=scs:406</p> <p>I tried adding response headers: </p> <pre class="brush:php;toolbar:false;">var xhr = new XMLHttpRequest(); xhr.open('POST', url); xhr.setRequestHeader('Cross-Origin-Opener-Policy', 'same-origin-allow-popups'); xhr.setRequestHeader('Access-Control-Allow-Origin', '*'); xhr.send(); var head1 = document.getElementsByTagName('head')[0]; var meta1 = document.createElement('meta'); meta1.httpEquiv = 'Permissions-Policy'; meta1.content = 'ch-ua-form-factor=()'; head1.appendChild(meta1);</pre> <p>I added the permissions policy because I was getting a warning. </p> <p>This script has no effect. </p> <p>Please help. </p>
P粉124890778
P粉124890778

reply all(1)
P粉726133917

The pop-up window was closed because I was already logged in. ee.data.authenticateViaOauth() doesn't work.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!