Update --customer-account-push to support multiple dev instances#3746
Open
Update --customer-account-push to support multiple dev instances#3746
--customer-account-push to support multiple dev instances#3746Conversation
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
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.
WHY are these changes introduced?
When multiple developers (or the same developer) run
dev --customer-account-pushconcurrently on the same store, the second instance overwrites the Customer Account callback URIs set by the first. This breaks Customer Account sign-in for the first dev server because its tunnel URL is no longer registered as a valid callback URI.WHAT is this pull request doing?
Removes
removeRegexfrom the push path so that each dev server additively registers its own callback URIs without touching any other session's URLs. The cleanup function (invoked on dev server shutdown) still usesremoveRegexto remove only that session's specific URLs.HOW to test your changes?
npx shopify hydrogen dev --customer-account-pushin a Hydrogen project — confirm Customer Account sign-in works--customer-account-pushon the same storefrontUnit tests:
pnpm vitest packages/cli/src/commands/hydrogen/customer-account/push.test.tsChecklist