2017-07-19 31 views
0

我在MSAL lib中遇到問題,無法在我的Android Xamarin Forms應用中進行身份驗證。 我對UWP項目沒有任何問題。Xamarin Android和MSAL身份驗證找不到UIP​​arent

我知道有采取一些平臺的具體行動,因此,我實現了這些在MainActivity.cs

App.UIParent = new UIParent(Xamarin.Forms.Forms.Context as Activity); 
App.IdentityClientApp.PlatformParameters = new PlatformParameters(this); 
App.IdentityClientApp.RedirectUri = "msalMyAppID://auth"; 

而且回調:

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

但我有一個錯誤信息,告訴我,UIParent無法找到,我可能會有一個缺失的程序集。

我很確定所有需要的組件都已安裝。 有沒有人遇到過這個?

回答

0

好吧,我的壞。 我一直在嘗試使用Microsoft.identity.Client 1.1-preview和我的項目使用v1.0.3實施解決方案 更新包含預發佈的包解決了問題。