FedCM get() 因 AbortError 拒绝:信号无故中止

问题描述 投票:0回答:1

我在网站上有“使用 google 登录”功能,它是使用 javascript 实现的。它工作正常,但现在开始抛出“client:50 [GSI_LOGGER]: FedCM get() 拒绝并出现 AbortError: 信号无故中止“当我们触发 google.accounts.id.prompt() 时。这个问题出现在 Chrome 上。它在其他浏览器上也能正常工作。我已经检查了冷却时间。 有谁知道解决办法吗?

我的代码是 google.accounts.id.initialize({ client_id: '########', 回调:handleCredentialResponse, use_fedcm_for_prompt:true }); google.accounts.id.prompt();

google-signin
1个回答
0
投票

同样的问题。对于临时解决方案,您可以强制 gsi 不使用 FedCM

google.accounts.id.initialize({
  ...
  use_fedcm_for_prompt: false // yes, explicitly passing false prevents the use of FedCM
})
© www.soinside.com 2019 - 2024. All rights reserved.