2013-12-17 129 views
0

我们正在尝试将移动服务身份验证用于跨平台移动应用程序。用户对象返回,很好地提供了ID,但就是这样。Azure移动服务/身份验证

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

我们需要用户的姓名,最好是电子邮件。

回答

1

如果你细使用预览功能,他们刚刚推出了增强的用户服务...退房 Enhanced users feature in Azure Mobile Services

+0

非常及时!谢谢。文章中详细介绍的Azure增强用户功能运行良好。这是一个预览功能,但在用户使用ID进行身份验证后,自定义API调用(Azure移动服务)会将附加用户信息作为JSON对象返回。 –

1

您将使用基于OAuth的认证,其中的Windows Live,谷歌,Facebook和Twitter将成为您连接用户的选择方式。

我需要得到用户的详细信息,因此我写了一个问题,结束了使用的LoginAsync,但随后2其他事情关键对我来说,获得更多的信息

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

然后

with a Custom API - node.js code 

然后在门户网站加入“SCOPE”,这在Azure的门户网站就像是一个web.config /的app.config,然后我能得到的电子邮件地址的区域(它警告它的用户共享此信息,其是正常的)

访问此链接: Azure Mobile Services - Getting more user information