当我尝试运行此代码时,我会得到这个问题(gapi.auth2.getauthinstance()。
错误:'iDpiframe_initialization_failed',详细信息:'您创建了一个新的客户端应用程序,该应用程序使用…i/web/guides/gis/gis迁移)以获取更多信息。'} 详细信息:“您创建了一个新的客户端应用程序,该应用程序使用库进行用户身份验证或授权,该应用程序将很快被弃用。新客户必须使用新库;现有客户也必须在对这些库进行弃用之前也必须迁移。请参阅迁移指南有关更多信息。” 错误:“ iDpiframe_initialization_failed”
error: 'idpiframe_initialization_failed', details: 'You have created a new client application that use…i/web/guides/gis-migration) for more information.'}
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 for more information."
error: "idpiframe_initialization_failed"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
GAPI登录方法将在2023年3月之前弃用,并且将不使用。因此,您必须使用提到的新方法此处
更新:您也可以将插件添加到代码中以绕过错误:
Gapi sign-in method will be deprecated by March 2023 and it will be not used.so you must go with the new method mentioned here
Update: Also you can add plugin_name to your code to bypass error like this:
您可以使用@react-oauth/google/google 它使用新的Google服务服务身份SDK
you can use @react-oauth/google it uses the new google service identity SDK
这就是我在React应用程序中解决的方式。
npm i gapi-script
从“ gapi-script”中导入{gapi};
它将解决问题
This is how I solved it in my React Application.
npm i gapi-script
import { gapi } from "gapi-script";
useEffect
code in your file.it will solve the problem
检查这些博客
https://github.com/github.com/anthonyjgrove/react-google-google-loogle-login/siss/ 502
或
在这里尝试这些是我使用的。
首先,我有一个名为usecript的通用钩子,可以将任何标签加载到HTML头部,并在脚本满载时具有回调函数:
然后,我创建了一个加载Google按钮的Googlelogin组件。
非常简单!
check these blog
https://github.com/anthonyjgrove/react-google-login/issues/502
or try these
Here is what I am using.
First I have a general hook called useScript that can load any tag into the HTML head and has a callback function for when the script fully loads:
Then I have created a GoogleLogin component that loads Google's button.
Pretty straightforward!
解决了这一
。
1
问题
There are three step to resolved this issue
1. Give google Login Options
2. Import SocialLoginModule into imports array
3. step register into provider like that