Skip to content

Configure Customer Account URLs during local HTTPS development - #3955

Open
fredericoo wants to merge 2 commits into
fb-local-https-vite-plugin-mkcertfrom
fb-local-https-vite-plugin-caapi
Open

Configure Customer Account URLs during local HTTPS development#3955
fredericoo wants to merge 2 commits into
fb-local-https-vite-plugin-mkcertfrom
fb-local-https-vite-plugin-caapi

Conversation

@fredericoo

@fredericoo fredericoo commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Depends on #3953.

TL;DR: Complete the local HTTPS setup by automatically registering the local Customer Account callback, JavaScript origin, and logout URLs.

Before

The local HTTPS plugin provisions and serves trusted certificates, but developers still need to link a storefront and copy the three Customer Account values into Shopify admin manually.

After

When dev:https starts outside CI, the plugin checks Shopify CLI compatibility, links an unlinked Hydrogen storefront, and runs shopify hydrogen customer-account-push with the bound local origin and portless JavaScript origin. CI and failures fall back to printing the exact manual values without stopping development.

What this changes

  • Requires Shopify CLI containing @shopify/cli-hydrogen 13.0.4 or later for automatic setup.
  • Detects local project linkage and starts shopify hydrogen link when needed.
  • Pushes the callback, portless JavaScript origin, and logout URLs through the public Shopify CLI command.
  • Standardises template and example HTTPS scripts on dev:https and detects them through npm_lifecycle_event.
  • Adds required Ubuntu, Windows, and macOS jobs that provision certificates and verify the resulting trusted dev:https server.

Developer impact

Extends the existing minor changeset for @shopify/hydrogen. No new option is required: enabled localHttps() development automatically attempts Customer Account setup and retains the existing manual fallback.

Risk

  • Starting dev:https can interactively link a project and update the linked storefront's Customer Account URLs.
  • Automatic setup depends on the installed Shopify CLI's bundled Hydrogen CLI version.
  • The URL push starts after Vite knows the actual bound port, so the server can become ready before the remote update completes.

How to Test

  1. Install Shopify CLI containing @shopify/cli-hydrogen 13.0.4 or later (not out yet lol sorry)
  2. Run pnpm --filter @shopify/hydrogen-template-react-router dev:https.
  3. Complete the Shopify CLI login/linking prompts when the project is unlinked.
  4. Confirm the linked storefront receives https://local.tryhydrogen.dev:5173/account/authorize, https://local.tryhydrogen.dev, and https://local.tryhydrogen.dev:5173.
  5. Open https://local.tryhydrogen.dev:5173 and complete a Customer Account login/logout flow.

@fredericoo
fredericoo force-pushed the fb-local-https-vite-plugin-mkcert branch 2 times, most recently from c9897c6 to b5b5d11 Compare August 19, 2026 16:17
Assisted-By: devx/05def498-8bdd-48d0-bd5e-35e4667a2f3d
Assisted-By: devx/05def498-8bdd-48d0-bd5e-35e4667a2f3d
@fredericoo
fredericoo force-pushed the fb-local-https-vite-plugin-caapi branch from 9d924ac to e6bb9c6 Compare August 20, 2026 12:43
@fredericoo
fredericoo marked this pull request as ready for review August 20, 2026 12:50
@fredericoo
fredericoo requested a review from a team as a code owner August 20, 2026 12:50
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