我有一个依赖 SharedArrayBuffer 的网络应用程序。我在我的网站上打开了跨域隔离,因为谷歌浏览器将在月底之前需要它。
但是,这样做会破坏 Google oAuth2 登录。
我尝试使用跨域标志导入身份验证脚本,但没有成功,因为它依次尝试导入其他被阻止的脚本。
登录.html
...
var script = document.createElement('script');
script.src = "https://apis.google.com/js/platform.js?onload=init";
script.setAttribute('async', 'true');
script.setAttribute('defer', 'true');
script.setAttribute('crossorigin', '');
document.getElementsByTagName('head')[0].appendChild(script);
...
哪个是仍然能够使用 google 的 oAuth2 的最佳方法?
谢谢,