From c1e378327239b54c9949aec0946759bae4b6018a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Mon, 10 Aug 2020 18:51:40 -0700 Subject: [PATCH] Revert "Set SameSite cookie attribute to Strict" This reverts commit 5ac55518abe87ff871942c02c0cf0c536c6035d8. Google Authentication doesn't work when Cookies are using strict mode. --- http/cookie/cookie.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/cookie/cookie.go b/http/cookie/cookie.go index 74f95314..8874c412 100644 --- a/http/cookie/cookie.go +++ b/http/cookie/cookie.go @@ -27,7 +27,7 @@ func New(name, value string, isHTTPS bool, path string) *http.Cookie { Secure: isHTTPS, HttpOnly: true, Expires: time.Now().Add(cookieDuration * 24 * time.Hour), - SameSite: http.SameSiteStrictMode, + SameSite: http.SameSiteLaxMode, } } @@ -41,7 +41,7 @@ func Expired(name string, isHTTPS bool, path string) *http.Cookie { HttpOnly: true, MaxAge: -1, Expires: time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC), - SameSite: http.SameSiteStrictMode, + SameSite: http.SameSiteLaxMode, } }