Skip to content

Commit c52cfe4

Browse files
Kudzematteodepalo
authored andcommitted
fix: SameSite = none for cookies.
1 parent fcb281a commit c52cfe4

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/Auth/OAuth.php

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,21 +351,27 @@ private static function setCookie(
351351
$cookieSet = setcookie(
352352
$signatureCookie->getName(),
353353
$signatureCookie->getValue(),
354-
$signatureCookie->getExpire(),
355-
"",
356-
"",
357-
$signatureCookie->isSecure(),
358-
$signatureCookie->isHttpOnly(),
354+
[
355+
'expires' => $signatureCookie->getExpire(),
356+
'path' => "",
357+
'domain' => "",
358+
'secure' => $signatureCookie->isSecure(),
359+
'httponly' => $signatureCookie->isHttpOnly(),
360+
'samesite' => "none"
361+
],
359362
);
360363

361364
$cookieSet = $cookieSet && setcookie(
362365
$cookie->getName(),
363366
$cookie->getValue(),
364-
$cookie->getExpire(),
365-
"",
366-
"",
367-
$cookie->isSecure(),
368-
$cookie->isHttpOnly(),
367+
[
368+
'expires' => $signatureCookie->getExpire(),
369+
'path' => "",
370+
'domain' => "",
371+
'secure' => $signatureCookie->isSecure(),
372+
'httponly' => $signatureCookie->isHttpOnly(),
373+
'samesite' => "none"
374+
],
369375
);
370376
// @codeCoverageIgnoreEnd
371377
}

0 commit comments

Comments
 (0)