Quantcast
Channel: Azure Mobile Apps forum
Viewing all articles
Browse latest Browse all 3756

[Java] Error using Facebook Android SDK for authentication on Mobile Services .NET Backend

$
0
0

I would like to know if it's possible to use the access token obtained from the Facebook SDK (and/or Google SDK), as authentication for Mobile Services.

My current implementation (shown below), in the callback, continuously returns a 401 error, stating "Error while authenticating user." I tried using the access token string directly but still received the same error.

However, full authentication works if I was to remove the JSON oauth object in the login code.

JsonObject body = new JsonObject();
body.addProperty("access_token", AccessToken.getCurrentAccessToken().getToken());
ListenableFuture<MobileServiceUser> mLogin = mobileServiceClient.login(MobileServiceAuthenticationProvider.Facebook,body);

Thanks,

Eyram



Viewing all articles
Browse latest Browse all 3756

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>