Hi Team,
I am trying to integrate Auth0 login with Windows Form Custom Action but facing an issue where I am able to login but the popup is not getting closed automatically.
I am only able to open it with the help of below two link
I need to call the Auth0.OidcClient.WinForms LoginAsync function from a non async method.
When I try this using the below code I receive a “System.Runtime.InteropServices.COMException: ‘activating a single-threaded class from MTA is not supported (Exception from HRESULT: 0x8000001D)’” exception. If I set the SetSynchronizationContext to WindowsFormsSynchronizationContext the code just hangs on the LoginAsync method with no MTA error.
Any help tracking down this issue or another technique to ac…
I ran across this same issue today and I think I found a good solution. Here is what I found to be the problem:
When loading an add-in to Excel 2016 I found the System.Threading.SynchronizationContext.Current was null. This changes .NETs behavior when doing async/await. In the new version of the library Auth0.OidcClient.WinForms we are taking on a new depedency: IdentityModel and IdentityModel.OidcClient2. In that library we are doing a HttpClient.GetUrl(...).ConfigureAwait(false). This ha…
please help me fix this issue.