Javascript 不使用iframe添加Google登录

Javascript 不使用iframe添加Google登录,javascript,iframe,google-api,google-signin,Javascript,Iframe,Google Api,Google Signin,我正在尝试添加谷歌登录到我的网站后,他们的。除了在Chrome设置中选择“阻止第三方Cookie和站点数据”选项外,它工作正常 在这种情况下,会抛出JavaScript错误和错误消息 Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. 该错误发生在Google Auth API尝试为登录按钮加载的ifra

我正在尝试添加谷歌登录到我的网站后,他们的。除了在Chrome设置中选择“阻止第三方Cookie和站点数据”选项外,它工作正常

在这种情况下,会抛出JavaScript错误和错误消息

Uncaught SecurityError: Failed to read the 'sessionStorage' property  from 'Window': Access is denied for this document.
该错误发生在Google Auth API尝试为登录按钮加载的iframe中

即使我选择了阻止第三方Cookie选项,是否有办法使其工作?也许有一种方法可以配置Google按钮,使其不使用iframe?它似乎有一个类似的设置,他们不使用iframe。他们是怎么做的?

你试过了吗?