meetdomaine / Kit

A frontend helper monorepo by the folks at Half Helix to help with Shopify theme development
MIT License
39 stars 10 forks source link

Resolves issues with secure cookies, blocking Shopify password form #27

Closed maxrolon closed 2 years ago

maxrolon commented 2 years ago

This PR resolves a critical issue with BrowserSync's handling of SameSite=None/Secure cookies. Hopefully we'll get a fix directly into BrowserSync but in the meantime this should resolve the issue. The issue stopped allowing the Shopify password form from being able to be submitted since the returning storefront_digest={hash} SameSite=None/Secure cookie was getting invalidated and thus breaking Shopify's ability to establish a session in the response.

A PR has been logged with BrowserSync here: https://github.com/BrowserSync/browser-sync/pull/1964. The BrowserSync function of note is: https://github.com/BrowserSync/browser-sync/blob/master/packages/browser-sync/lib/server/proxy-utils.js#L122

In my diagnosis of the issue I also added support for self certified TLS certificates so that the browser won't prompt that localhost is not secure. In order to use this functionality the following tutorials can be followed:

netlify[bot] commented 2 years ago

Deploy Preview for half-helix-kit ready!

Name Link
Latest commit dd04103da4cf2120ffd2c82a282f753fa8f322bc
Latest deploy log https://app.netlify.com/sites/half-helix-kit/deploys/6282fe4b1e93860008819a3e
Deploy Preview https://deploy-preview-27--half-helix-kit.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.