问题描述
我有一个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)
这篇关于Xamarin ADAL AcquireTokenAsync不返回结果!击中了OnActivityResult的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!