You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
I am using Identity Server4 , I want to save the IdentityResources and APIResource I am using IdentityServer4.EntityFrameworkCore and I want to save this by Tenant and I am using SASSKit for multi tenant , So I have create custom PersistedGrantDbContext as shown below.
public class SqlServerPersistedGrantDbContext : DbContext, IPersistedGrantDbContext
and In the Start up I have added as below , but the issue is calling UseIdentityServer middleware is called first , then UseMultitenancy is called second , so because of this I could not able to get the Tenant object in the above class SqlServerPersistedGrantDbContext . Please let me know how to solve this issue. or how to store IdentityResources and APIResource in multi tenant environment.
I am using Identity Server4 , I want to save the IdentityResources and APIResource I am using IdentityServer4.EntityFrameworkCore and I want to save this by Tenant and I am using SASSKit for multi tenant , So I have create custom PersistedGrantDbContext as shown below.
{
public SqlServerPersistedGrantDbContext(DbContextOptions options, AppTenant tenant) : base(options)
{
this.tenant = tenant;
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(tenant.ConnectionString);
base.OnConfiguring(optionsBuilder);
}
protected override void OnModelCreating(ModelBuilder builder)
{
//builder.ConfigurePersistedGrantContext(storeOptions);
base.OnModelCreating(builder);
}
}
and In the Start up I have added as below , but the issue is calling UseIdentityServer middleware is called first , then UseMultitenancy is called second , so because of this I could not able to get the Tenant object in the above class SqlServerPersistedGrantDbContext . Please let me know how to solve this issue. or how to store IdentityResources and APIResource in multi tenant environment.
The text was updated successfully, but these errors were encountered: