Skip to content Skip to sidebar Skip to footer

Android Azure Mobile Services Google Auth

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 Service

Solution 1:

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) Configure Azure Authentication / Authorization for Google

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

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

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

Post a Comment for "Android Azure Mobile Services Google Auth"