PHP-Auth
PHP-Auth copied to clipboard
Allow for 'SameSite' cookie attribute and 'X-Frame-Options' header to be disabled to support framing
The X-Frame-Options header can already be disabled as documented:
\header_remove('X-Frame-Options');
Of course, this should be replaced with a proper option passed to this library so that setting and then removing the header is not necessary.
Disabling the SameSite attribute on cookies:
vendor/delight-im/auth/src/UserManager.php- Replace
Session::regenerate(true);withSession::regenerate(true, null);
- Replace
vendor/delight-im/auth/src/Auth.php- Replace
@Session::start();with@Session::start(null); - Replace
Session::regenerate(true);withSession::regenerate(true, null); - After
$cookie->setSecureOnly($params['secure']);append$cookie->setSameSiteRestriction(null);in all three (!) occurrences
- Replace