我正在尝试使用firebase在我的iOS应用中实施谷歌登录。我按照本教程。 https://firebase.google.com/docs/auth/ios/google-signin 我在firebase中设置了iOS应用程序,并使用了已下载的GoogleService-Info.plist中的google clientID和reversedClientID。
仅供参考:我有自定义登录按钮,而不是谷歌登录按钮。无论如何,当我点击登录按钮时,谷歌会在网页浏览中显示以下错误。
我知道我的问题与本问题中描述的问题相同。
Google 400 Error: invalid request Custom scheme URIs are not allowed for 'Web' client type
但是,在我的情况下,我在Firebase中创建了应用程序,但仍然出现错误。任何想法,请...
答案 0 :(得分:13)
第一步是检查您是否已经拥有适用于iOS的OAuth 2.0 ID。为此,请打开API控制台中的Credentials page。我希望您能在 OAuth 2.0客户端ID 部分下找到适合您应用的 iOS客户端。如果没有,请关注此Guide 第二步是使用 OAuth 2.0客户端ID 部分中的 iOS客户端ID 替换 Web客户端ID 。为此,您应该打开 GoogleService-Info.plist 并修改以下键: [CLIENT_ID [value] .apps.googleusercontent.com com.googleusercontent.apps。[value] REVERSED_CLIENT_ID 。