remove autorenew feature as it wont work
Docker Build and Release Upload / build (push) Successful in 1m18s

This commit is contained in:
2025-07-24 21:57:00 -07:00
parent e21862ecb7
commit 5851cbfdfe
-14
View File
@@ -87,20 +87,6 @@ builder.Services.AddAuthentication(options => {
OnMessageReceived = context => {
context.Token = context.Request.Cookies[AuthJWT.TokenName];
return Task.CompletedTask;
},
OnTokenValidated = context => {
var jwtToken = context.SecurityToken as JwtSecurityToken;
if (jwtToken != null) {
var exp = jwtToken.ValidTo;
var now = DateTime.UtcNow;
if ((exp - now) < TimeSpan.FromDays(3)) {
int accountID = Convert.ToInt32(context.Principal?.FindFirst(ClaimTypes.NameIdentifier)?.Value);
bool isPersistent = bool.Parse(context.Principal?.FindFirst(ClaimTypes.IsPersistent)?.Value);
var newJWT = AuthJWT.GenereateJWTToken(accountID, isPersistent);
AuthJWT.SignIn(context.HttpContext.Response, isPersistent, newJWT);
}
}
return Task.CompletedTask;
}
};
});