From a3d917874894131a49a6d8600580dbe62e062282 Mon Sep 17 00:00:00 2001 From: Karolis Kudze Kraujelis Date: Mon, 1 Jul 2024 16:56:36 +0300 Subject: [PATCH] fix: SameSite = none for cookies. --- src/Auth/OAuth.php | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/Auth/OAuth.php b/src/Auth/OAuth.php index dca08198..7ec9814e 100644 --- a/src/Auth/OAuth.php +++ b/src/Auth/OAuth.php @@ -351,21 +351,27 @@ private static function setCookie( $cookieSet = setcookie( $signatureCookie->getName(), $signatureCookie->getValue(), - $signatureCookie->getExpire(), - "", - "", - $signatureCookie->isSecure(), - $signatureCookie->isHttpOnly(), + [ + 'expires' => $signatureCookie->getExpire(), + 'path' => "", + 'domain' => "", + 'secure' => $signatureCookie->isSecure(), + 'httponly' => $signatureCookie->isHttpOnly(), + 'samesite' => "none" + ], ); $cookieSet = $cookieSet && setcookie( $cookie->getName(), $cookie->getValue(), - $cookie->getExpire(), - "", - "", - $cookie->isSecure(), - $cookie->isHttpOnly(), + [ + 'expires' => $signatureCookie->getExpire(), + 'path' => "", + 'domain' => "", + 'secure' => $signatureCookie->isSecure(), + 'httponly' => $signatureCookie->isHttpOnly(), + 'samesite' => "none" + ], ); // @codeCoverageIgnoreEnd }