Skip to content

Commit

Permalink
Merge pull request #6321 from Mostafa-Moafi/Issue6320
Browse files Browse the repository at this point in the history
delete authentication cookie when the cookie expires or is invalid
  • Loading branch information
valadas authored Jan 27, 2025
2 parents 0117e05 + 9a9c52a commit a2a9447
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private void Application_BeginRequest(object sender, EventArgs e)
var persisted = AuthCookieController.Instance.Find(authCookie.Value);
if (persisted != null && persisted.ExpiresOn <= DateTime.UtcNow)
{
app.Request.Cookies.Remove(FormsAuthentication.FormsCookieName);
app.Response.Cookies[FormsAuthentication.FormsCookieName].Expires = DateTime.Now.AddDays(-1);
}
}

Expand Down

0 comments on commit a2a9447

Please sign in to comment.