Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
f4f6a4c to
ffdf400
Compare
cb6e240 to
00cbcd2
Compare
5 tasks
00cbcd2 to
0d60e8d
Compare
ffdf400 to
20d4186
Compare
ryancbahan
reviewed
Apr 2, 2026
| return [...new Set(scopes)] | ||
| } | ||
|
|
||
| function expandImpliedStoreScopes(scopes: string[]): Set<string> { |
Contributor
There was a problem hiding this comment.
maybe worth adding a code comment for context on why we need this
ryancbahan
approved these changes
Apr 2, 2026
isaacroldan
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Canonicalize the scopes returned by
shopify store authbefore comparing them to the requested scopes.This treats compressed returned scopes like
write_productsas satisfyingread_products,write_products, while still failing auth when unrelated requested scopes are actually missing.Why
In the PKCE flow, Shopify can return the highest-privilege scope instead of echoing every requested scope. That makes
store authreject valid responses when the request includes both read and write access for the same resource.This PR aligns scope validation with that behavior so
store authonly fails when a real requested scope is missing.How
write_* -> read_*scopes when validating the token responseAuthScopesimplementation inshopify-api-jsTesting
To test manually:
shopify store auth --store <store> --scopes read_products,write_productswrite_productsMeasuring impact
How do we know this change was effective? Please choose one:
Checklist