skorp/detect-incompatible-samesite-useragents

Determine if UserAgent is incompatible with SameSite=None

1.0.1 2021-06-25 07:29 UTC

This package is auto-updated.

Last update: 2024-03-25 13:40:55 UTC


README

This class tries to determine the incompatible UserAgents for SameSite=None Attribute.

68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f736b6f72702f6465746563742d696e636f6d70617469626c652d73616d65736974652d757365726167656e7473 Laravel

Installation

You can install this package via composer using this command:

composer require "skorp/detect-incompatible-samesite-useragents"

Usage

use Skorp\Dissua\SameSite;

$shouldSendSameSiteNone = SameSite::handle('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130');
if(!$shouldSendSameSiteNone) {
    //remove samesite attribute

}

ported from : https://www.chromium.org/updates/same-site/incompatible-clients

Links about SameSite Cookie:

https://www.chromium.org/updates/same-site/incompatible-clients
https://web.dev/samesite-cookie-recipes/
https://www.netsparker.com/blog/web-security/same-site-cookie-attribute-prevent-cross-site-request-forgery
https://www.thinktecture.com/identity/samesite/prepare-your-identityserver/

Your feedback is welcome.