Android Azure移动服务Google身份验证 [英] Android Azure Mobile Services Google auth

查看:82
本文介绍了Android Azure移动服务Google身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

内置的身份验证器中的Azure MobileServiceClient尝试使用Android设备登录时显示Web视图.有没有一种方法可以用来调用播放服务登录"对话框并通过该对话框登录?我正在按照给出的

The Azure MobileServiceClient in built authenticator shows a webview when trying to log in using an Android device. Is there a way such that it can be used to call the Play Services Login Dialog box and log in through there? I was following the tutorial given here.

推荐答案

是的,您可以使用客户端定向流",假设Google Play服务登录对话框会生成标准的Google令牌,并且您知道Google的客户端ID应用程序.

Yes, you can use a "Client Directed Flow", assuming the Google Play Services Login Dialog produces a standard Google token and you know the Client ID of the Google App.

1)为Google配置Azure身份验证/授权

2)将您的应用配置为使用[Google Play服务登录对话框]( https://developers.google.com/android/guides/google-services-plugin )

2) Configure your app to use the [Google Play Services Login Dialog] (https://developers.google.com/android/guides/google-services-plugin)

3)从GoogleAuthUtil.getToken获取Google令牌

3) Obtain the Google token (from GoogleAuthUtil.getToken)

4)使用Google令牌使用Azure Mobile Apps Android SDK进行客户端控制的登录:

4) Use the google token to do a client-directed login using the Azure Mobile Apps Android SDK:

ListenableFuture<MobileServiceUser> mLogin = mClient.login(MobileServiceAuthenticationProvider.Google, theGoogleToken);

不应再生成另一个对话框,但是您将按照

There should not be another dialog produced, but you will get the ZUMO-TOKEN back as described in the Server Flow

这篇关于Android Azure移动服务Google身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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