0

We're trying to use the mobile services authentication for a cross-platform mobile app. The User object returned, nicely provides the ID, but that's it.

user = await client.LoginAsync(this, MobileServiceAuthenticationProvider.Google);

We need the user's name and, ideally, email.

carlosfigueira
  • 85,035
  • 14
  • 131
  • 171
CM_Expat
  • 246
  • 2
  • 9

2 Answers2

1

if you're fine using a preview feature, they've just introduced enhanced user services...check out Enhanced users feature in Azure Mobile Services

carlosfigueira
  • 85,035
  • 14
  • 131
  • 171
JuneT
  • 7,840
  • 2
  • 15
  • 14
  • Very timely! Thanks. The enhanced Users Features for Azure detailed in the article works well. It's a preview feature, but after the user is authenticated with the ID, a custom api call (Azure Mobile Services), pulls the additional user information back as a JSON object. – CM_Expat Dec 18 '13 at 09:39
1

You will be using the OAuth , in which Windows Live, Google, Facebook and Twitter will be the way in which you have options of connecting users.

I needed to get more information on user and thus I wrote a question and ended up using the LoginAsync, but then 2 other things were CRITICAL for me to get more information

var userInfo = await MobileServices.MobileService.InvokeApiAsync(
"userInfo", HttpMethod.Get, null);

Then

with a Custom API - node.js code 

THEN an area in the portal with adding "SCOPE" which in Azure portal is like a web.config / app.config , then I was able to get email address (it does warn the user about it sharing this information, which is normal)

Visit this link: Azure Mobile Services - Getting more user information

Community
  • 1
  • 1
Tom Stickel
  • 19,633
  • 6
  • 111
  • 113