Skip to content

Commit

Permalink
fix: SameSite = none for cookies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudze committed Jul 1, 2024
1 parent ed791f3 commit a3d9178
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/Auth/OAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a3d9178

Please sign in to comment.