AliBazzi / IdentityServer4.Contrib.RedisStore

A persistence layer using Redis DB for operational data and for caching capability for Identity Server 4
https://www.nuget.org/packages/IdentityServer4.Contrib.RedisStore
MIT License
137 stars 48 forks source link

Type error on dotnet core 2.2 preview 2: missing IIdentityServerBuilder #12

Closed kooshan closed 5 years ago

kooshan commented 5 years ago

Hi, I encountered this issue a while ago and I finally narrowed it down to this package reference

<PackageReference Include="IdentityServer4.Contrib.RedisStore" Version="1.4.5" />

If I comment that out and dismiss the redis cache API calls everything builds flawlessly.

AliBazzi commented 5 years ago

I haven't tested out to adopt the library using any previews of .net core 2.2 I will try to play around with it when I have time.

But if you are keen to use the library using the preview of .net core 2.2, you can help me out by trying to pin point the issue, this library is compatible with .net standard 1.6 And a list of dependencies, not sure if one of them is not compatible with .net standard 2.1 or .net core 2.2.

kooshan commented 5 years ago

Thanks for the quick answer. According to the dependencies I don't see anything causing this issue except the referenced IdentityServer4 version

<PackageReference Include="IdentityServer4" Version="1.0.0" />

Would increasing that to a later version like 2.2.0 break anything? Actually that would mandate an elevation to .netstandard2.0 and Newtonsoft.Json version >= '11.0.2'.

It compiles with a bunch of warnings. I would take some time to check for runtime errors as soon as I can find some spare time.

AliBazzi commented 5 years ago

I'm willing to upgrade the library targeting .net standard 2 once Identity Server 4 v 2.3 is released.

One of the things looking forward to is to start relying on StackExchange.Redis v 2, which introduces pipelining that requires .net standard 2 at least.

but for the time being, I will keep the current release of the library compatible with Identity server 4 v 1.0.0 for all the customers who are still relying on that and not willing to upgrade.

kooshan commented 5 years ago

Fine! thanks. I guess I have to go with commenting out the caching and wait.

AliBazzi commented 5 years ago

Hi @kooshan I may found the cause of the error, because Identity Server 4 team introduced this new library : IdentityServer4.Storage Which is a breaking change, the current implementation of IdentityServer4.Contrib.RedisStore will not work because the interfaces the library relies on are not in IdentityServer4 nuget package anymore, I need to work on that soon.

AliBazzi commented 5 years ago

@kooshan Please do verify that this preview release solves your problem

Hub24Amir commented 5 years ago

I have the same issue with dotnet core 2.0 and dentityServer4.Contrib.RedisStore 2.0.0 :(

AliBazzi commented 5 years ago

@Hub24Amir Can you elaborate more ? or provide a code to reproduce ? else I will not be able to help

Hub24Amir commented 5 years ago

Thanks for quick response. i guess situation is similar to what Kooshan mentioned however i just want to add using ver 2.0 didnt solve the issue. previously you asked Kooshan if ver 2 preview release does solve the issue. Thanks

AliBazzi commented 5 years ago

Can you share more about your current setup, nuget packages version .. etc

Hub24Amir commented 5 years ago

Dont worry. It's not important anymore. Thanks for your help.