auth0 / auth0-oidc-client-net

OIDC Client for .NET Desktop and Mobile applications
https://auth0.github.io/auth0-oidc-client-net/
Apache License 2.0
84 stars 49 forks source link

Auth0.OidcClient.WPF #250

Closed ForteUnited closed 1 year ago

ForteUnited commented 1 year ago

The Auth0.OidcClient.WPF is not compatible with .NET 5 or .NET 6. It also has a dependency on Microsoft.Toolkit.Wpf.UI.Controls.WebView which has been deprecated.

Can we expect a .NET 6 compatible version anytime soon?

frederikprijck commented 1 year ago

Can you look at https://github.com/auth0/auth0-oidc-client-net/issues/167 and https://github.com/auth0/auth0-oidc-client-net/issues/209 and see if that helps?

Here is an example that uses our SDK with .NET 5 (it shouldnt be that different with .NET 6 or 7): https://github.com/frederikprijck/auth0-oidc-wpf-net5, so it definetly works, even though does require some changes on your side.

Thanks

ForteUnited commented 1 year ago

Thanks for the reply.

I arrived at a solution after several hours late yesterday and it is fundamentally similar to the solution in #209.

I created a net new project and copied over the relevant code files to setup the .net 6 library proj, not using the upgrade assistant. I modified the WebViewBrowser class to use the new WebView2 component. I also did not use the Microsoft.Windows.CsWinRT as I never ran into that issue. Those are the main differences.

Would it be difficult to take my/our solutions and push out a .NET 6 version of the .Wpf nuget from Auth0? I could submit a pr or something but I don't want to bother there is no plan to take this across the finish line.

frederikprijck commented 1 year ago

Someone has done this before and gave up (I believe that PR is not how we want to add support). However,.I am happy to review a PR if it does not change any behavior for existing users.

We haven't prioterized this ourselves, as it's perfectly doable without adding explicit support. However, always happy to improve the experience where possible.

As an example, you can also look at https://github.com/auth0-samples/auth0-WinFormsWPF-oidc-samples/commit/1fbcd876fb603a812a2d0a4fde692d99f1d4210a#diff-de10b23b78c263497cbf3a8f065f7ae7d9987a72355011924d2fc2c523c7cd5d.