We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cea3972 commit a65c86eCopy full SHA for a65c86e
backend/internal/handlers/auth.go
@@ -91,8 +91,6 @@ func (h *Handler) HandleLogin(w http.ResponseWriter, r *http.Request) {
91
return
92
}
93
session, _ := store.Get(r, "session-cook")
94
-
95
- // Simulate user authentication
96
session.Values["authenticated"] = true
97
session.Values["user"] = inputUser.Email
98
session.Save(r, w)
@@ -204,6 +202,7 @@ func (h *Handler) HandleAuthenticate(w http.ResponseWriter, r *http.Request) {
204
202
//h.logError(w, err.Error(), nil, http.StatusBadRequest)
205
203
//return
206
+ logCookies(r)
207
session, err := store.Get(r, "session-cook")
208
// Check if "authenticated" is set and true in the session
209
if auth, ok := session.Values["authenticated"].(bool); !ok || !auth {
0 commit comments