首页 > 解决方案 > 谷歌登录 iOS 与服务器

问题描述

我正在将 Google 登录添加到我的 iOS 应用中。在指南中告诉您创建一个 iOS Oauth id,但在Android 指南中,他们还告诉您,如果您使用后端服务器进行身份验证,则需要使用 Web Oauth id 而不是 Android 的。

所以我的问题是,如果我在我的 iOS 应用程序中使用服务器,我需要使用 Web Oauth id 还是 iOS 的?

谢谢

标签: iosoauthgoogle-cloud-platformgoogle-oauthgoogle-signin

解决方案


问题:我在我的 iOS 应用程序中使用服务器,我需要使用Web Oauth id还是 iOS 的?

您必须使用 iOS Oauth id 进行 Google 登录,因为在没有有效 iOS 的情况下从 iOS 端开始,Oauth id您无法使用 iOS 应用程序在 Google 上使用 Google SDK. Also,捆绑标识符came into picture if you are talking about登录`。

一言以蔽之,您不能在 iOS App 中使用 Web Oauth id。

更新:

iOS、Android 和 Server 完全不同,因为对于 iOS,我们必须添加 .plist 文件,对于 Android .json 文件到项目中等等。

您必须使用下面的客户端 ID 来集成 Google SDK。

GIDSignIn.sharedInstance().clientID = Client_ID

谢谢。


推荐阅读