Skip to content

Commit

Permalink
fix: session saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed Jul 28, 2024
1 parent 1c91de2 commit 410078c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions backend/internal/handlers/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ func (h *Handler) HandleLogin(w http.ResponseWriter, r *http.Request) {
}
session.Values["authenticated"] = true
session.Values["user"] = inputUser.Email
if session.IsNew {
if err := session.Save(r, w); err != nil {
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
return
}
if err := session.Save(r, w); err != nil {
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
return
}

var domain string
Expand Down

0 comments on commit 410078c

Please sign in to comment.