Destroy the session on signout
Kill it with fire
This commit is contained in:
parent
a6f9396760
commit
163b0f9edc
1 changed files with 1 additions and 0 deletions
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue