All Projects → GoogleChromeLabs → Samesite Examples

GoogleChromeLabs / Samesite Examples

Licence: apache-2.0
Examples of using the SameSite cookie attribute in a variety of language, libraries, and frameworks.

Projects that are alternatives of or similar to Samesite Examples

scrapy-cookies
A middleware of cookies persistence for Scrapy
Stars: ✭ 19 (-93.43%)
Mutual labels:  cookies
nginx cookie flag module
Module for Nginx which allows to set the flags "HttpOnly", "secure" and "SameSite" for cookies.
Stars: ✭ 101 (-65.05%)
Mutual labels:  cookies
Cookieconsent
A free solution to the EU, GDPR, and California Cookie Laws
Stars: ✭ 3,017 (+943.94%)
Mutual labels:  cookies
PolishCookieConsent
Polish Cookie Consent is an extension, which automatically accepts privacy policy/GDPR on websites.
Stars: ✭ 17 (-94.12%)
Mutual labels:  cookies
ngx-universal
Library for angular universal app
Stars: ✭ 23 (-92.04%)
Mutual labels:  cookies
CockyGrabber
C# library for the collection of browser information such as cookies, logins, and more
Stars: ✭ 46 (-84.08%)
Mutual labels:  cookies
iron-session
🛠 Node.js stateless session utility using signed and encrypted cookies to store data. Works with Next.js, Express, NestJs, Fastify, and any Node.js HTTP framework.
Stars: ✭ 1,729 (+498.27%)
Mutual labels:  cookies
Adamantium Thief
🔑 Decrypt chromium based browsers passwords, cookies, credit cards, history, bookmarks, autofill. Version > 80 is supported.
Stars: ✭ 283 (-2.08%)
Mutual labels:  cookies
contao-cookiebar
Display the information about cookies on your Contao website
Stars: ✭ 27 (-90.66%)
Mutual labels:  cookies
Cookies.js
Simple cookie framework with full Unicode support
Stars: ✭ 254 (-12.11%)
Mutual labels:  cookies
cookie-consent
Cookie consent with accessible dialog, agnostic tag triggers and conditional content, script and embed hooks.
Stars: ✭ 55 (-80.97%)
Mutual labels:  cookies
kooky
Go code to read cookies from browser cookie stores.
Stars: ✭ 81 (-71.97%)
Mutual labels:  cookies
angular2-cookie-law
Angular2+ component that provides a banner to inform users about cookie law
Stars: ✭ 38 (-86.85%)
Mutual labels:  cookies
tradingconv
Convert trading history of cryptocurrency platforms
Stars: ✭ 24 (-91.7%)
Mutual labels:  cookies
Auth Boss
🔒 Become an Auth Boss. Learn about different authentication methodologies on the web.
Stars: ✭ 2,879 (+896.19%)
Mutual labels:  cookies
FaucetCryptoBot
A bot for FaucetCrypto a cryptocurrency faucet. The bot can currently claim PTC ads, main reward and all the shortlinks except exe.io and fc.lc.
Stars: ✭ 69 (-76.12%)
Mutual labels:  cookies
igcreator
Instagram mass account creator with proxies 🔃 and cookies 🍪 support
Stars: ✭ 35 (-87.89%)
Mutual labels:  cookies
Javascript For Everyone
A step by step guide to learn JavaScript and programming
Stars: ✭ 285 (-1.38%)
Mutual labels:  cookies
Immortaldb
🔩 A relentless key-value store for the browser.
Stars: ✭ 2,962 (+924.91%)
Mutual labels:  cookies
Zebra Cookie
A ridiculously small (~500 bytes minified) JavaScript API for writing, reading and deleting browser cookies
Stars: ✭ 15 (-94.81%)
Mutual labels:  cookies

🍪 SameSite examples

This is a companion repo for the "SameSite cookies explained" article on web.dev. This is your starting point for how cookies work, the functionality of the SameSite attribute, and the changes in Chrome to apply a SameSite=Lax policy by default while requiring the use of SameSite=None; Secure for cookies in a third-party context.

This functionality is available now in Chrome 76 behind the associated flags to let you test the effect on your site. This is intended to become default behaviour as of Chrome 80.

SameSite=Lax by default

Turn this flag on to have Chrome apply the equivalent of SameSite=Lax to cookies without a SameSite attribute specified.

Require Secure with SameSite=None

Turn on this flag along with the previous flag to have Chrome enforce the need for any SameSite=None cookie to also specify the Secure attribute.

See affected cookies

  • Flag chrome://flags/#cookie-deprecation-messages

This will add console warning messages for every single cookie potentially affected by this change.

⚠️ WARNING: You will see a lot of messages! Seriously, a lot of messages.

Since the vast majority of cookies do not have any SameSite attribute set that means they are all sent in a cross-site context, regardless of whether or not the intent is to use them.

As you add the correct SameSite and Secure values to your cookies, you will be able to use the console warnings to test for any you have missed. Try this without the previous flags enabled.

📋 Examples

In this repo you'll find examples on making use of SameSite=None; Secure in a variety of languages, libraries, and frameworks. The SameSite attribute is widely supported, but the addition of the explicit None value may require updates or work-arounds.

🚧 NOTE: To test the None value is set you need to test in a browser that parses this addition, e.g. Chrome 76 or above. The changes should be backwards compatible, but those browsers should ignore the None value so you will not see it in any cookie view.

If your specific platform isn't covered here, please raise an issue or a pull request to include it.

🙋 Questions

You can raise an issue in this repo if there is specific behaviour you would like to see documented or something that's not clear in the current examples.

You can also use the samesite tag on StackOverflow which we will monitor on a regular basis. As the discussion evolves there, we'll also add a Frequently Asked Questions section to this repo for easy reference.

💻 Contributing

Issues and pull requests are always welcome. For details, see CONTRIBUTING

This is not an officially supported Google product.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].