используется ASP.NET MVC 6 (.net 5)
такой код в public IServiceProvider ConfigureServices(IServiceCollection services)
public static class IdentityServerRegistrar
{
public static void Register(IServiceCollection services, IConfigurationRoot configuration)
{
services.AddIdentityCore<User>();
//.AddEntityFrameworkStores<ZapytaiDbContext>()
//.AddDefaultTokenProviders();
services.AddIdentityServer()
.AddDeveloperSigningCredential()
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources())
.AddInMemoryApiResources(IdentityServerConfig.GetApiResources())
.AddInMemoryClients(IdentityServerConfig.GetClients(configuration))
.AddAbpPersistedGrants<ZapytaiDbContext>()
.AddAbpIdentityServer<User>();
}
также есть код
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
...
app.UseAuthentication();
if (bool.Parse(_appConfiguration["Authentication:JwtBearer:IsEnabled"]))
{
app.UseJwtTokenMiddleware();
}
if (bool.Parse(_appConfiguration["IdentityServer:IsEnabled"]))
{
app.UseJwtTokenMiddleware("IdentityBearer");
app.UseIdentityServer();
}
app.UseReact(config =>
{
});
if (DatabaseCheckHelper.Exist(_appConfiguration["ConnectionStrings:Default"]))
{
app.UseAbpRequestLocalization();
}
//Hangfire dashboard & server (Enable to use Hangfire instead of default job manager)
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
// Authorization = new[] { new AbpHangfireAuthorizationFilter(AppPermissions.Pages_Administration_HangfireDashboard) }
});
app.UseHangfireServer();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
//endpoints.MapHub<AbpCommonHub>("/signalr");
endpoints.MapControllerRoute("defaultWithArea", "{area}/{controller=Home}/{action=Index}/{id?}");
endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
});
не понимаю почему куки не генерируются, помогите пожалуйста
PS проверил в постмане, куки вроде есть .AspNetCore.Identity.Application может только должно быть .AspNetCore.Identity ?