San someone help me fix this problem?
I have
services.AddIdentity<User, IdentityRole>(...)
and then
services.ConfigureApplicationCookie(options =>
{
options.Cookie.Name = "somename";
options.Cookie.Domain = ".somename"
options.Events = new CookieAuthenticationEvents()
{
OnRedirectToLogin = (context) =>
{
context.HttpContext.Response.Redirect("somesite/login/));
return Task.CompletedTask;
},
};
options.ReturnUrlParameter = CookieAuthenticationDefaults.ReturnUrlParameter;
});
and finally:
services.Configure<SecurityStampValidatorOptions>(options =>
{
options.ValidationInterval = TimeSpan.FromSeconds(10);
});
Authorization takes place on all domains perfectly. But the last service doesn't work as it should. For example, when I update user roles. You need to log out and log in again.
How to fix this problem? Thanks.