我正在一个控制台应用程序中使用OneDrive SDK进行编码。我遇到了一些麻烦,尝试正确地进行身份验证。我很想知道是否有人在这方面做过或者能够指引我正确的方向?
目前的代码:
[STAThread]
static void Main(string[] args)
{
var scopes = new[] {"onedrive.readonly", "wl.signin"};
var msaAuthProvider = new MsaAuthenticationProvider(ClientId, "https://login.live.com/oauth20_desktop.srf", scopes);
msaAuthProvider.AuthenticateUserAsync();
}
每当我运行调试器时,我发现
isAuthenticated
属性设置为false
。