我试图实现客户端只使用OAuth登录。获取以下错误:
details: "You have created a new client application that uses libraries for user authentication or authorization that will soon be deprecated. New clients must use the new libraries instead; existing clients must also migrate before these libraries are deprecated. See the [Migration Guide](https://developers.google.com/identity/gsi/web/guides/gis-migration) for more information."
error: "idpiframe_initialization_failed"
在此之后,每当我尝试登录时,我都会得到以下错误:
error: "popup_closed_by_user"
[[Prototype]]: Object
现在我正在开发localhost:3000,因此我在http://localhost:3000 2.0客户端ID中添加了OAuth作为授权的JS来源,还尝试将发布状态从测试更改为生产。用户类型设置为外部类型。
发布于 2022-05-11 22:12:05
默认情况下,新创建的客户端ID现在被阻止使用旧平台库,现有客户端ID不受影响。2022年7月29日之前创建的新客户端ID可以设置plugin_name
以启用。
因此,就我而言,解决办法是:
window.gapi.load('client:auth2', () => {
window.gapi.client.init({
clientId: '******.apps.googleusercontent.com',
plugin_name: "chat"
})
https://stackoverflow.com/questions/72172877
复制相似问题