Skip to content

Commit a65c86e

Browse files
author
Björn Urban
committed
fix: log cookies
1 parent cea3972 commit a65c86e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

backend/internal/handlers/auth.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ func (h *Handler) HandleLogin(w http.ResponseWriter, r *http.Request) {
9191
return
9292
}
9393
session, _ := store.Get(r, "session-cook")
94-
95-
// Simulate user authentication
9694
session.Values["authenticated"] = true
9795
session.Values["user"] = inputUser.Email
9896
session.Save(r, w)
@@ -204,6 +202,7 @@ func (h *Handler) HandleAuthenticate(w http.ResponseWriter, r *http.Request) {
204202
//h.logError(w, err.Error(), nil, http.StatusBadRequest)
205203
//return
206204
}
205+
logCookies(r)
207206
session, err := store.Get(r, "session-cook")
208207
// Check if "authenticated" is set and true in the session
209208
if auth, ok := session.Values["authenticated"].(bool); !ok || !auth {

0 commit comments

Comments
 (0)