Shopify / Shopify/buy-button-js

Cookie rejected due to invalid domain

Open
#752 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
260
Forks
122
Avg merge
5d 14h
Merged PRs (30d)
2

Description

There are cookie rejection warnings for the set cookies (despite GDPR issues) which originate in a loop function whose goal is to set cookies for varying domains such as .shopify.com, .myshopify.com, .oberlo.com and finally "/" (which succeeds).

Each of them is pretested by two document.cookie assignments
cookietest=1
and
cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT

Please consider optimizing that loop and checking the given domain initially. Would the buybutton API be used within shopify/myshopify at all, I wonder.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the loop that sets cookies for .shopify.com, .myshopify.com, .oberlo.com, and "/", using the two document.cookie checks described in the issue to reproduce the warnings. Determine which domains reject the cookie and verify that the completed behavior avoids invalid-domain attempts while retaining the successful root-domain case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.