Kostis
Kostis

Reputation: 963

.NET Core + Openiddict InvalidCastException

I'm using openiddict on a .net core 1.1 project. So far i was able to login through /connect/token endpoint.

Suddenly, without any changes to the controller i get the following exception

InvalidCastException: Unable to cast object of type 'AspNet.Security.OpenIdConnect.Primitives.OpenIdConnectRequest' to type 'OpenIddict.OpenIddictOptions'.

Is there anyone else having the same issue?

Upvotes: 2

Views: 262

Answers (1)

Kévin Chalet
Kévin Chalet

Reputation: 42010

API changes have been introduced in ASOS 2.0.0-rc1-final that are incompatible with the exact OpenIddict version you're using. To fix that, remove the packages that start with AspNet.Security.OpenIdConnect from your .nuget\packages folder and restore your project when it's done.

Upvotes: 2

Related Questions