I'm using a custom handler to save sessions in MongoDB
and a custom class to create cookies with attribute SameSite
using the header()
function, though this specification is not widely adopted (yet).
However, the PHP
session cookie is started by the session_start()
function that uses setcookie()
, which forces you to create a cookie session with no SameSite
attribute %.
How to customize the cookie of session in PHP
?