Google跨客户端身份验证是否可以通过iOS进行,如果可以,如何实现? [英] Is Google Cross-client Auth possible with iOS, and if so, how?

查看:158
本文介绍了Google跨客户端身份验证是否可以通过iOS进行,如果可以,如何实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用oAuth2,并且在我的google API控制台中有一个项目,其中包含iOS客户端和注册的Web客户端。



我想auth从我的iOS应用程序,并让我的网络后端检索访问令牌,因此它可以做谷歌api处理繁重的工作。



我试过按照这些说明这是用于android: https://developers.google.com/accounts/docs/CrossClientAuth



但是当我将范围赋值为:


oauth2:server:client_id:MY.WEB.CLIENT.ID:api_scope: http:// www。 google.com/m8/feeds/ https://mail.google.com/ https://www.googleapis.com/auth/plus.login


任何人都成功实现了iOS的类似设置?如果有,请解释或共享文件?您使用哪些库或SDK从iOS应用程序获取谷歌代码,以便Web后端可以使用它来生成适当的访问令牌? 方案

截至6月18日,google iOS SDK 1.7.0支持与Android功能一致的一次性授权代码: https://developers.google.com/+/release-notes/


I'm using oAuth2, and I have a project in my google API console with an iOS client and a Web client registered.

I'd like to auth in from my iOS app, and have my web backend retrieve an access token so it can do the heavy processing work with the Google api.

I've tried following these instructions which are for android: https://developers.google.com/accounts/docs/CrossClientAuth

But I keep getting an invalid scope when I assign the scope as:

oauth2:server:client_id:MY.WEB.CLIENT.ID:api_scope:http://www.google.com/m8/feeds/ https://mail.google.com/ https://www.googleapis.com/auth/plus.login

Anyone successfully implement a similar set up for iOS? If so please explain or share documentation? What libraries or SDKs did you use to get the code from google on the iOS app that the web backend could use to generate a proper access token of it's own?

解决方案

As of June 18th, the google iOS SDK 1.7.0 supports one-time authorization code which is consistent with the Android feature: https://developers.google.com/+/release-notes/

这篇关于Google跨客户端身份验证是否可以通过iOS进行,如果可以,如何实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆