Skip to content

Commit

Permalink
fix: try to set cookie correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed May 1, 2024
1 parent b50cb12 commit 694039e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions backend/internal/handlers/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 694039e

Please sign in to comment.