Configure Identity Server in dotnetcore2
I am trying to configure entity framework for identity server using the dotnet core rc1 libraries. This sample code
services.AddIdentityServer()
.AddTemporarySigningCredential()
.AddConfigurationStore(builder =>
builder.UseSqlServer(connectionString, options =>
options.MigrationsAssembly(migrationsAssembly)))
.AddOperationalStore(builder =>
builder.UseSqlServer(connectionString, options =>
options.MigrationsAssembly(migrationsAssembly)));
does not compile. AddTemporarySigningCredential does not exist and (more importantly) builder.UseSqlServer does not exist. builder seems to be a different type than it was with dotnetcore1 so the extension method does not apply.
Working on the same thing. You will need the 2.x packages on NuGet I think, which is currently still in "prerelease". At the time of writing v2.0.0-rc1 is the latest version.
See also #1055 (the upgrade issue) and #1057 (breaking changes list).
Hi, I have the same problem, even after updating to rc1 I have the same issue, AddSigningCredential still doesn't exist.
According to #1057:
AddTemporarySigningCredential=>AddDeveloperSigningCredential
Check out that issue for more things that have changed.
Thank you, I should have read that.
Yeah UseSqlServer is the real issue. I'm using the 2.0 rc1 libraries.
try:
var idsrvBuilder = services.AddIdentityServer()
.AddDeveloperSigningCredential()
.AddConfigurationStore(options =>
{
options.DefaultSchema = "token";
options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString);
}
)
.AddOperationalStore(options =>
{
options.DefaultSchema = "token";
options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString);
}
);
Much obliged @vitalbsk 👍
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.