“Web”客户端类型不允许自定义方案 URI - Google 与 Firebase

2023-12-26

我正在尝试使用 firebase 在我的 iOS 应用程序中实现 google 登录。我遵循这个教程。https://firebase.google.com/docs/auth/ios/google-signin https://firebase.google.com/docs/auth/ios/google-signin我已经在 firebase 中设置了 iOS 应用程序,并使用下载的 GoogleService-Info.plist 中的 google clientID 和 returnedClientID 。

仅供参考:我有一个自定义登录按钮,而不是谷歌登录按钮。无论如何,当我单击登录按钮时,谷歌会在网络视图中显示以下错误。

我知道我的问题与这个问题中描述的相同。

Google 400 错误:请求无效“Web”客户端类型不允许使用自定义方案 URI https://stackoverflow.com/questions/42269251/google-400-error-invalid-request-custom-scheme-uris-are-not-allowed-for-web-c

但是,就我而言,我已经在 Firebase 中创建了应用程序,但仍然收到错误。有什么想法请...


第一步是检查您是否已有适用于 iOS 的 OAuth 2.0 ID。为此,请打开凭证页面 https://console.developers.google.com/apis/credentials在 API 控制台中。我希望你会发现适用于您的应用程序的 iOS 客户端 under OAuth 2.0 客户端 ID部分。如果没有,请按照此操作Guide https://developers.google.com/identity/protocols/OAuth2InstalledApp#creatingcred第二步,更换网络客户端 ID之内iOS 客户端 ID from OAuth 2.0 客户端 ID部分。为此,您应该打开GoogleService-Info.plist并修改以下键:CLIENT_ID with [值].apps.googleusercontent.com and REVERSED_CLIENT_ID with com.googleusercontent.apps.[值].

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

“Web”客户端类型不允许自定义方案 URI - Google 与 Firebase 的相关文章

随机推荐