Extension for Cookie SameSite attribute
veriteworks/cookiefix 79
This extension is adjusting the Cookie SameSite attribute issue since Chrome 80.
Build Tests
Code Quality
Release Discipline
Release history audited up to v3.3.0
Tested on Magento 2.4.9
Recent Test History
Each release is tested against the latest Magento version at that time.
+9 older tests
Top Contributors
View LeaderboardShare This Module's Status
README
Loaded from GitHubExtension for Cookie SameSite attribute
This extension is adjusting Cookie SameSite attribute issue since Chrome 80.
NOTICE: this extension is experimental.
Features
Add SameSite attribute into Magento session cookie. For 3DS payment, payment gateways tend to send request via POST to Magento based website. However without SameSite=None for session cookie, Magento cannot continue any PHP session state. This extension applies the SameSite value configured in web/cookie/samesite (default Lax) to the session and affected cookies. Set it to None to let customers place orders via 3DS payment or other ID integrations. Clients known to mishandle SameSite=None (iOS 12, macOS 10.14 Safari, Chromium 51-67, old UC Browser) keep Magento's default.
On Luma-based themes, the configured SameSite applies to cookies written by Magento's form-key-provider and cookie storage (form_key, mage-cache-*, recently_viewed/compared and product_data_storage), independently of affected_keys. None requires a secure session cookie; Lax, empty and invalid settings keep Magento's default without an extra script. Cookies set through $.mage.cookies (such as user_allowed_save_cookie) and Hyvä themes are unchanged. Browsers known to mishandle None keep Magento's default, with compatibility checked in the browser because pages are cached.
How to install
- composer require veriteworks/cookiefix
- bin/magento module:enable Veriteworks_CookieFix
- bin/magento setup:upgrade
Configuration
After 3.0.0-beta1, you can change SameSite cookie configuration from admin panel. Go to "Stores > configuration > web" and open cookie section. You can see "SameSite" field. By default, this extension sets SameSite configuration value to limited cookies. If you hope to update the list, please update web/cookie/affected_keys configuration value.
Support
If you have any issues about this extension, open an issue on Github. Technical support question is same.
Contribution
Any contributions are highly appreciated. Please send me a pull request.
License
Copyright
(c) 2020 Veriteworks Inc.
This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.