Skip to content

Update --customer-account-push to support multiple dev instances#3746

Open
andguy95 wants to merge 4 commits intomainfrom
an-feat-customer-account-push-multiple-urls
Open

Update --customer-account-push to support multiple dev instances#3746
andguy95 wants to merge 4 commits intomainfrom
an-feat-customer-account-push-multiple-urls

Conversation

@andguy95
Copy link
Copy Markdown
Collaborator

WHY are these changes introduced?

When multiple developers (or the same developer) run dev --customer-account-push concurrently 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 removeRegex from 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 uses removeRegex to remove only that session's specific URLs.

HOW to test your changes?

  1. Run npx shopify hydrogen dev --customer-account-push in a Hydrogen project — confirm Customer Account sign-in works
  2. In a separate terminal, start a second dev server with --customer-account-push on the same storefront
  3. Verify both servers can sign in via Customer Account (the first should no longer break)
  4. Stop the second server — verify the first still works
  5. Stop the first server — verify URLs are cleaned up

Unit tests: pnpm vitest packages/cli/src/commands/hydrogen/customer-account/push.test.ts

image

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or functional changes. Test changes or internal-only config changes do not require a changeset.
  • I've added tests to cover my changes
  • I've added or updated the documentation

@andguy95 andguy95 requested a review from a team as a code owner April 22, 2026 21:32
@shopify
Copy link
Copy Markdown
Contributor

shopify Bot commented Apr 22, 2026

Oxygen deployed a preview of your an-feat-customer-account-push-multiple-urls branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment April 22, 2026 9:54 PM

Learn more about Hydrogen's GitHub integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant