Skip to content

Adjust store auth warning for non-canonical store domain#7150

Merged
isaacroldan merged 1 commit intomainfrom
dlm-store-execute-canonicalize-store
Apr 2, 2026
Merged

Adjust store auth warning for non-canonical store domain#7150
isaacroldan merged 1 commit intomainfrom
dlm-store-execute-canonicalize-store

Conversation

@dmerand
Copy link
Copy Markdown
Contributor

@dmerand dmerand commented Apr 1, 2026

What

Improve the shopify store auth callback-store mismatch error so it points the user at the permanent store domain Shopify returned during authentication.

Why

Some stores can start auth on one domain and return a different canonical .myshopify.com domain in the OAuth callback. Today that fails with a generic store-mismatch error, which makes it hard to tell whether the issue is an alias or vanity domain.

This change keeps the existing callback validation but makes the next step explicit.

How

  • keep rejecting callbacks whose shop parameter does not match the requested store
  • when Shopify returns a different store domain, include that returned domain in the error guidance
  • tell the user to re-run shopify store auth with the permanent store domain instead of an alias or vanity domain

Testing

To test manually:

  1. Run shopify store auth --store <alias-or-vanity-domain> --scopes read_products
  2. Complete the PKCE flow until Shopify redirects back with a different canonical shop domain
  3. Confirm the CLI error tells you which permanent store domain to retry with

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@dmerand dmerand mentioned this pull request Apr 1, 2026
5 tasks
Copy link
Copy Markdown
Contributor Author

dmerand commented Apr 1, 2026

@dmerand dmerand mentioned this pull request Apr 1, 2026
5 tasks
@dmerand dmerand marked this pull request as ready for review April 1, 2026 21:39
@dmerand dmerand requested a review from a team as a code owner April 1, 2026 21:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@dmerand dmerand force-pushed the dlm-store-execute-scope-canon branch from 00cbcd2 to 0d60e8d Compare April 1, 2026 23:01
@dmerand dmerand force-pushed the dlm-store-execute-canonicalize-store branch from 03a1517 to 3bbda17 Compare April 1, 2026 23:01
Copy link
Copy Markdown
Contributor

@isaacroldan isaacroldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎩 and works!

Base automatically changed from dlm-store-execute-scope-canon to main April 2, 2026 08:18
@isaacroldan isaacroldan added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit eb5ae10 Apr 2, 2026
55 of 89 checks passed
@isaacroldan isaacroldan deleted the dlm-store-execute-canonicalize-store branch April 2, 2026 08:25
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.

4 participants