From 4391e9fc3135218723b2a6e6c7b197ac18d564b0 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 19 Mar 2024 05:02:48 -0400 Subject: [PATCH] fix: define new cookie in EchoAuthCookie but use the existing cookies values --- account/jwt.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/account/jwt.go b/account/jwt.go index aed5140..75d426b 100644 --- a/account/jwt.go +++ b/account/jwt.go @@ -143,7 +143,15 @@ func EchoAuthCookie(jc jape.Context, apiName string) { continue } - http.SetCookie(jc.ResponseWriter, cookies[0]) + http.SetCookie(jc.ResponseWriter, &http.Cookie{ + Name: cookies[0].Name, + Value: cookies[0].Value, + Expires: cookies[0].Expires, + Secure: true, + HttpOnly: true, + Path: "/", + Domain: cookies[0].Domain, + }) } }