chore(webui): clear all expired sessions on each user account login
Closes #34
This commit is contained in:
parent
215c630ba0
commit
c483d909f9
2 changed files with 11 additions and 0 deletions
|
@ -91,6 +91,9 @@ func handleLoginPOST(db *database.DB) http.Handler {
|
|||
SameSite: http.SameSiteStrictMode,
|
||||
Secure: true,
|
||||
})
|
||||
if err := db.DeleteExpiredSessions(); err != nil {
|
||||
slog.Error("failed to delete expired sessions after user login", "err", err, "accountId", account.Id)
|
||||
}
|
||||
http.Redirect(w, r, "/", http.StatusFound)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue