【发布时间】:2019-02-05 05:33:58
【问题描述】:
首先,我在我的 iOS 原生应用中集成了 Google Drive,并使用 GTMOAuth2 进行授权登录,并带有一个客户端 ID。
然后,我现在正在尝试集成 firebase 身份验证,并且我在 GoogleService-Info.plist 中获得了一个新的客户端 ID。
当我使用 firebase 授权然后在 google drive 中获取数据时,我收到了 Invalid Credentials 错误。
如何使用 firebase 授权来获取 google drive 中的数据?为什么同一个APP有两个client id,可以在GoogleService-Info.plist中修改client id吗?
【问题讨论】:
-
在 Drive API 中访问文件需要 certain scopes - 读写,所以 OAuth 是不够的。
-
感谢您的帮助,我已经添加了 Google Drive API 范围,但是当我在 GoogleService-Info.plist 中使用新的客户端 ID 时,我仍然收到 error = "invalid_client"。
标签: firebase google-drive-api firebase-authentication google-signin gtm-oauth2