diff --git a/app/controlplane/internal/service/auth.go b/app/controlplane/internal/service/auth.go index 21794c91d..60f10a24b 100644 --- a/app/controlplane/internal/service/auth.go +++ b/app/controlplane/internal/service/auth.go @@ -434,7 +434,15 @@ func generateUserJWT(userID, passphrase string, expiration time.Duration) (strin } func setOauthCookie(w http.ResponseWriter, name, value string) { - http.SetCookie(w, &http.Cookie{Name: name, Value: value, Path: "/", Expires: time.Now().Add(10 * time.Minute)}) + http.SetCookie(w, &http.Cookie{ + Name: name, + Value: value, + Path: "/", + Expires: time.Now().Add(10 * time.Minute), + HttpOnly: true, + Secure: true, + SameSite: http.SameSiteLaxMode, + }) } func generateAndLogDevUser(userUC *biz.UserUseCase, log *log.Helper, authConfig *conf.Auth) error {