Xamarin ADAL AcquireTokenAsync not returning result! OnActivityResult is hit

冷暖自知 提交于 2020-01-06 07:22:14

问题


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

I have an AuthService that calls

var authResultAsync = await authContext.AcquireTokenAsync(...);

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?


回答1:


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

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



来源:https://stackoverflow.com/questions/55247957/xamarin-adal-acquiretokenasync-not-returning-result-onactivityresult-is-hit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!