From 694039ea1a7ea435275d7a9982fe6cd0c47f74a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Urban?= Date: Wed, 1 May 2024 15:53:18 +0200 Subject: [PATCH] fix: try to set cookie correctly --- backend/internal/handlers/auth.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/backend/internal/handlers/auth.go b/backend/internal/handlers/auth.go index 8784e25..bcd00b8 100644 --- a/backend/internal/handlers/auth.go +++ b/backend/internal/handlers/auth.go @@ -231,18 +231,6 @@ func (h *Handler) HandleAuthenticate(w http.ResponseWriter, r *http.Request) { http.Error(w, "Internal Server Error", http.StatusInternalServerError) return } - session.Options = &sessions.Options{ - Path: "/", // Available across the entire domain - MaxAge: 3600, // Expires after 1 hour - HttpOnly: true, // Not accessible via JavaScript - Secure: true, // Only sent over HTTPS - SameSite: http.SameSiteNoneMode, // Controls cross-site request behavior - Domain: r.Host, - } - if err := session.Save(r, w); err != nil { - http.Error(w, "Internal Server Error", http.StatusInternalServerError) - return - } slog.Info("created new session with id", session.ID)