hi
You can add an OpenIdConnect and Cookies authentication schemes to your separate site
Then everything will work as Public website
context.Services.AddAuthentication(options =>
{
options.DefaultScheme = "Cookies";
options.DefaultChallengeScheme = "oidc";
})
.AddCookie("Cookies", options =>
{
options.ExpireTimeSpan = TimeSpan.FromDays(365);
options.CheckTokenExpiration();
})
.AddAbpOpenIdConnect("oidc", options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]); ;
options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
options.ClientId = configuration["AuthServer:ClientId"];
options.ClientSecret = configuration["AuthServer:ClientSecret"];
options.UsePkce = true;
options.SaveTokens = true;
options.GetClaimsFromUserInfoEndpoint = true;
options.Scope.Add("roles");
options.Scope.Add("email");
options.Scope.Add("phone");
options.Scope.Add("MyProjectName");
});
hi
The oauth2 handle by OpenIddict:
https://github.com/abpframework/abp/tree/dev/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers
hi
Please share a screenshot. Thanks
So this is a question of how to set and get environment variables. Thanks.
hi
If you are using the MyProjectName.DbMigrator you need to put your connection string to appsettings.json.
https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json#L3
If you already did that, you can write some logs when running the DbMigrator.
eg: print current connection string.
please share it if you have custom the code of DbMigrator
Thanks
hi
As summary, when I set __tenant header, it is cached and until an unsuccessful attempt made, the cache remains still.
Can you share a simple project to reproduce this?
liming.ma@volosoft.com
hi
You can configure the ConnectionStrings of AbpDbConnectionOptions.
hi
I will find a way.