2013-12-17 217 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