Destroy the session on signout

Kill it with fire
This commit is contained in:
Eli Ribble 2026-04-16 19:50:23 +00:00
parent a6f9396760
commit 163b0f9edc
No known key found for this signature in database

View file

@ -152,6 +152,7 @@ func SigninUser(r *http.Request, username string, password string) (*platform.Us
func SignoutUser(r *http.Request, user platform.User) {
sessionManager.Put(r.Context(), "user_id", "")
sessionManager.Put(r.Context(), "username", "")
sessionManager.Destroy(r.Context())
log.Info().Str("username", user.Username).Int("user_id", (user.ID)).Msg("Ended user session")
}