Вот код внутри метода входа в систему: < /p>
await HttpContext.SignInAsync(
CookieAuthenticationDefaults.AuthenticationScheme,
new ClaimsPrincipal(identity),
new AuthenticationProperties
{
IsPersistent = true,
AllowRefresh = true,
ExpiresUtc = DateTimeOffset.UtcNow.AddHours(10),
});
return RedirectToAction("Index", "UserDashBoard");
Подробнее здесь: https://stackoverflow.com/questions/764 ... -for-autho
Мобильная версия