Search code examples
asp.net-coreidentityserver4

Where is AddConfigurationStore and AddOperationalStore in IdentityServer4 v2.3.2


So I create a project based on quickstart of identityserver.io, and I did everything according to tutorial. But I don't have

AddConfigurationStore

AddOperationalStore

on

services.AddIdentityServer

Can anybody help me ?

It is worth mentioning that they are available in IdentityServer4 v2.2.0 and in IdentityServer release page, I don't see any thing about this change.

This is my configuration code :

var builder = services.AddIdentityServer(options =>
        {
            options.Events.RaiseErrorEvents = true;
            options.Events.RaiseInformationEvents = true;
            options.Events.RaiseFailureEvents = true;
            options.Events.RaiseSuccessEvents = true;
        })
            .AddInMemoryIdentityResources(Config.GetIdentityResources())
            .AddInMemoryApiResources(Config.GetApis())
            .AddInMemoryClients(Config.GetClients())
            .AddAspNetIdentity<ApplicationUser>();

Solution

  • AddConfigurationStore and AddOperationalStore are extensions in the Microsoft.Extensions.DependencyInjection namespace, but located in the IdentityServer4.EntityFramework assembly.

    You'll have to add the IdentityServer4.EntityFramework NuGet package to your project.