Impliment the StayLoggedIn

This commit is contained in:
2025-06-16 16:49:38 -07:00
parent 76ebf30518
commit 68b74f760b
3 changed files with 19 additions and 11 deletions
@@ -48,12 +48,10 @@ namespace MistoxWebsite.Server.Controllers {
await HttpContext.SignInAsync(
CookieAuthenticationDefaults.AuthenticationScheme,
new ClaimsPrincipal( new ClaimsIdentity( claims, "serverAuth" ) ),
new ClaimsPrincipal( new ClaimsIdentity( claims, "Auth" ) ),
new AuthenticationProperties {
AllowRefresh = true,
IssuedUtc = DateTime.UtcNow,
ExpiresUtc = DateTime.UtcNow.AddDays( 32 ),
IsPersistent = true,
ExpiresUtc = DateTime.UtcNow.AddYears(30), // Add 30 years with sliding on
IsPersistent = request.EmailVerified, // Is set from the StayLoggedIn
}
);
return test;