IdentityModel / IdentityModel.OidcClient.Samples

Apache License 2.0
296 stars 164 forks source link

Issue when updating NetCoreConsoleClient to .NET Core 5.0 #106

Open hernandgr opened 3 years ago

hernandgr commented 3 years ago

Hello!

I am using NetCoreConsoleClient sample app to implement authentication in a .NET 5.0 console app I'm doing, but I'm getting an error in the console app after authenticating in the browser.

image

I updated your sample code to reproduce the error I'm getting. You can find the code here: https://github.com/hernandgr/NetCoreConsoleClientV5

The changes that I did to your app are:

  1. Updated target framework to .NET 5.0
  2. Updated nuget packages to latest version
  3. Installed Microsoft.Extensions.Hosting nuget package that I use in my project and then it breaks

My guess is that some of the dependencies updated when I installed Microsoft.Extensions.Hosting nuget package are not working with your code, but I haven't been able to find how to get it to work.

Thanks for your help.

igalfsg commented 3 years ago

@hernandgr were you able to get it to work?

Also for me it was only version 4.0.0 if I use 3.x.x it works

LvanLeeuwen commented 3 years ago

We're experiencing the same issues. We updated the packages to Microsoft.AspNetCore.Server.Kestrel 2.2.0 and IdentityModel.OidcClient 4.0.0. We experimented with target framework .NET 5.0 and .NET Framework 4.8. Both resulting in the same exception as described by @hernandgr.

Furthermore, we also tried out the other samples in the repo. None of them worked for net48 with the updated packages.

It would be really helpful to have updated samples using the newest versions of the packages and target frameworks.

hernandgr commented 3 years ago

@hernandgr were you able to get it to work?

Sorry, no, I was not able to do it when I was trying.

leastprivilege commented 3 years ago

It would be really helpful to have updated samples using the newest versions of the packages and target frameworks.

All I can say is that the library is working for my use-cases. It is too much work for me to keep every sample updated to every permutation of libraries and frameworks.

It's FOSS - that what the often mentioned community should be for.