services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
}).AddCookie(CookieAuthenticationDefaults.AuthenticationScheme,options =>
{
options.LoginPath = "/Login";
options.LogoutPath = "/Logout";
options.ExpireTimeSpan = TimeSpan.FromMinutes(43200);
});
سلام خسته نباشید
از تکه کد بالا استفاده کردم ولی کوکی اکسپایر میشود
و کاربر logOut میشود
ممنون میشوم راه حل بدید
سلام
https://toplearn.com/ShowQuestion/51326/expire-session