Xamarin ADAL AcquireTokenAsync不返回结果!击中了OnActivityResult [英] Xamarin ADAL AcquireTokenAsync not returning result! OnActivityResult is hit

查看:107
本文介绍了Xamarin ADAL AcquireTokenAsync不返回结果!击中了OnActivityResult的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个xamarin.android应用,正在使用ADAL进行身份验证。

I have a xamarin.android app and am using ADAL to authenticate.

我有一个AuthService调用

I have an AuthService that calls

var authResultAsync =等待authContext.AcquireTokenAsync(...);

此调用永远不会返回AuthenticationResult对象,但我只是打了我的OnActivityResult而无法访问我的令牌?

This call never returns an AuthenticationResult object but rather I just hit my OnActivityResult and I am never able to access my token??

        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
    {
        base.OnActivityResult(requestCode, resultCode, data);
        AuthenticationContinuationHelper.SetAuthenticationContinuationEventArgs(requestCode, resultCode, data);
    }

对此有何帮助?我应该以其他方式访问令牌吗?

Any help on this would be greatly appreciated? Am I supposed to access my token a different way?

推荐答案

我正在调用 AuthenticationContinuationHelper (MSAL)不是 AuthenticationAgentContinuationHelper (ADAL)

I am calling the AuthenticationContinuationHelper (MSAL) not AuthenticationAgentContinuationHelper (ADAL)

https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/issues/1541

这篇关于Xamarin ADAL AcquireTokenAsync不返回结果!击中了OnActivityResult的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆