Skip to content

Commit e49194e

Browse files
authored
Merge pull request #85 from String-xyz/develop
v1.0.2-alpha
2 parents 1760116 + 83c56d8 commit e49194e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/handler/common.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func SetJWTCookie(c echo.Context, jwt service.JWT) error {
5656
cookie.Value = jwt.Token
5757
// cookie.HttpOnly = true // due the short expiration time it is not needed to be http only
5858
cookie.Expires = jwt.ExpAt // we want the cookie to expire at the same time as the token
59-
cookie.SameSite = http.SameSiteLaxMode
59+
cookie.SameSite = http.SameSiteNoneMode
6060
cookie.Path = "/" // Send cookie in every sub path request
6161
cookie.Secure = !IsLocalEnv() // in production allow https only
6262
c.SetCookie(cookie)
@@ -70,7 +70,7 @@ func SetRefreshTokenCookie(c echo.Context, refresh service.RefreshTokenResponse)
7070
cookie.Value = refresh.Token
7171
cookie.HttpOnly = true
7272
cookie.Expires = refresh.ExpAt // we want the cookie to expire at the same time as the token
73-
cookie.SameSite = http.SameSiteLaxMode
73+
cookie.SameSite = http.SameSiteNoneMode
7474
cookie.Path = "/login/" // Send cookie only in /login path request
7575
cookie.Secure = !IsLocalEnv() // in production allow https only
7676
c.SetCookie(cookie)
@@ -107,7 +107,7 @@ func DeleteAuthCookies(c echo.Context) error {
107107
cookie.Name = "refresh_token"
108108
cookie.Value = ""
109109
cookie.Expires = time.Now()
110-
cookie.SameSite = http.SameSiteLaxMode
110+
cookie.SameSite = http.SameSiteNoneMode
111111
cookie.Path = "/login/" // Send cookie only in refresh path request
112112
cookie.Secure = !IsLocalEnv()
113113
c.SetCookie(cookie)

0 commit comments

Comments
 (0)