IdentityServer4 use sql server with .net core 3

.net-core .net-core-3.0 entity-framework-core identityserver4

Question

I'm trying to configure IdentityServer4 in a .Net Core 3 project.

My ConfigureServices-Method looks like this:

services.AddIdentityServer()
                .AddSigningCredential(new X509Certificate2(@"*redacted*", "*redacted*"))
                .AddTestUsers(InMemoryConfiguration.GetUsers().ToList())
                .AddConfigurationStore(builder => builder.UseSqlServer(...))

Unfortunately, the builder.UseSqlServer(...) which used to work in earlier versions is not available anymore.

What is the correct way to configure IdentityServer4 to use an SQL Server nowadays?

Thanks in advance

1
0
10/4/2019 1:13:46 PM

Accepted Answer

Try this

.AddConfigurationStore(options =>
{
    options.ConfigureDbContext = b =>
        b.UseSqlServer(...);
})
1
10/4/2019 1:25:16 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow