Shopify / koa-shopify-auth

DEPRECATED Middleware to authenticate a Koa application with Shopify
MIT License
80 stars 63 forks source link

Fix: Example can mislead devs to pass an array instead of comma-separ… #98

Closed ardeearam closed 1 year ago

ardeearam commented 3 years ago

…ated string

My initial impression of ['Your scopes'] is [process.env.SCOPES] which erroneously and quietly resolves to ['read_themes,read_script_tags']. This then produces subtle verifyRequest() errors which is hard to track down.

WHY are these changes introduced?

WHAT is this pull request doing?

This pull request fixes the example code which upon first impression requires an array with the first string as a comma-separated value.

Type of change

Checklist

mkevinosullivan commented 1 year ago

Note that this repo is no longer maintained and this PR will not be reviewed. Prefer the official JavaScript API library.

If you still want to use Koa, see simple-koa-shopify-auth for a potential community solution.

shopify-shipitnext[bot] commented 1 year ago

Shopify Merge Queue takes care of merging pull requests in this repository. Once you are ready to ship this PR, comment /shipit to enqueue this PR for merging.

If /shipit does not work, you can also ship PRs by going to your Shipit Next PR page and clicking on the Ship It button in the corner.

### Command Comments - `/shipit`: Enqueue the PR for merging - `/cancel`: Cancel an enqueued merge - `/shipit --emergency`: Skip the queue and merge directly ### Merge process Shopify Merge Queue will follow these steps to get a PR merged: 1. It will check whether this pull request follows our process and best practices. CI should be green, and the PR should have at least one approved review. 2. It places the PR in the queue. Other PRs that have been enqueued before will have priority. 3. Once it is this PR's turn, it will create merge commits of what `main` could look like after this PR is merged in combination with a batch of other PRs that are queued up. 4. It will then wait for CI to run on those merge commits. Once one of them comes back green, it will fast-forward the `main` branch to point to that commit. Your PR will be marked as merged. 5. Because CI already successfully ran on this merge commit, main is always green and the PR will be ready to be deployed right away. This process will make sure that all PRs are treated equally when many are ready to be merged around the same time, and will make sure the CI status of the main branch is always green. #### Notes - Shopify Merge Queue publishes a CI status on your PR to keep you up to date with what is going on during the process. - If anything goes wrong in this process, Shopify Merge Queue will leave a comment on the PR. - Comment `/cancel` if you change your mind and want to stop the PR from being merged. ### Emergency merging If, **in case of emergency**, you want to bypass the queue and get a PR merged as quickly as possible, `/shipit --emergency` instead. Shopify Merge Queue will ignore CI and reviews for the PR, and merge it directly to the main branch. Afterwards, somebody may ask you why this was an emergency that warranted skipping the queue. Note that an emergency merge invalidates all merge commits that the merge queue created for other PRs, because they are based on a specific main SHA. Shopify Merge Queue will have to create new merge commits for those PRs based on the new main SHA, and restart CI on all of them. This reduces throughput significantly, so please only use the emergency procedure for real emergencies. ### Questions or feedback? If you have any questions or feedback, please visit the [#help-eng-infrastructure](https://shopify.slack.com/archives/C01MXHNTT4Z) in Slack.

View more details at https://shipit-next.shopifycloud.com/Shopify/koa-shopify-auth/pull/98.