I just wrote an article about SameSite=None cookie attribute and how to implement its solution in PHP/Laravel apps.
Give it a read and let me know your thoughts or if I missed something. Also if it can be improved in any way.
Thank you for your quick reply!
I'm using CI 3.0.1 and PHP Version 7.2.24. If its not not supported in earlier version, how to deal with that?
You can try and upgrade it to 7.3.0. I recommend doing it on a "dev/staging" server first.
As per documentation, CodeIgniter 3 cookie helper `set_cookie` does not see to support SameSite cookie attribute.
So, after upgrading PHP version, use native PHP method `setcookie` to set your cookies and provide `samesite` attribute value.
Thanks, but what about browsers that are not supported? APP will crash in those browsers. As this will be applicable to only Chrome 80+ and some other
You are right. I am assuming you cannot use "Composer" in your project. If you could use composer, it was simply pulling this https://github.com/jenssegers/agent package and use the code I shared in article.
What you can do now is look at this package's code, or, look at https://www.php.net/manual/en/function.get-browser.php function in core PHP, and come up with a solution for yourself.
If you do come up with a solution, please share it here for others. Best of luck.
|an hour ago|
|2 hours ago|
|2 hours ago|
|3 hours ago|