For my REST Api I want to use the OpenIddict authentication scheme. As database I am using MongoDb. I have installed all necessary dependencies. All dependencies have the newest version.
In my Startup.cs I want to register OpenIddict now. In the first step make this (like in the documentaion)
services.AddDbContext<UserDbContext>(options =>
{
options.UseOpenIddict<ObjectId>();
});
Right on options.UseOpenIddict<ObjectId>(); I get the following error:
'DbContextOptionsBuilder' does not contain a definition for 'UseOpenIddict' and no accessible extension method 'UseOpenIddict' accepting a first argument of type 'DbContextOptionsBuilder' could be found(are you missing a using directive or an assembly reference?)
It's the CS1061 error.
I am using all directives. I have googled a lot. The only thing I found was that you need to install the required packages, but I installed them. (In the solution files of the tutorial I am following are the exact same ones)
Does anyone know how to solve this?