使用WinJS进行Azure移动服务身份验证 [英] Azure Mobile Services authentication with WinJS
问题描述
我使用适用于Windows(和电话)8.1项目的WinJS 2.0启动了通用应用程序,并完成了教程以注册我的应用程序以进行身份验证并使用客户端ID和客户端密码配置移动服务.但是,现在我该如何实际使用应用程序上的Microsoft帐户登录?我在任何地方都找不到如何执行此操作的示例...我错过了什么吗?
I started a Universal app with WinJS 2.0 for a Windows (and Phone) 8.1 project, and went through the tutorial to register my app for authentication and configure Mobile Services with the Client ID and Client secret. But now how do I actually handle a login with a Microsoft account on my application? I can't find any examples of how to do this anywhere...am I missing something?
我知道移动服务正在我的应用程序上工作,因为我能够使用它在表中进行插入.
I know Mobile Services is working on my application because I am able to do an insertion into a table with it.
推荐答案
在您的客户端对象上,调用:
On your client object, call:
client.login('microsoftaccount').done(function (result) {
// handle successful login
}, function (error) {
// handle failed login
});
这篇关于使用WinJS进行Azure移动服务身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!