Skip to content

Add store auth list for local store auth sessions - #7714

Merged
alfonso-noriega merged 3 commits into
mainfrom
donald/store-list-local-fallback
Jun 19, 2026
Merged

Add store auth list for local store auth sessions#7714
alfonso-noriega merged 3 commits into
mainfrom
donald/store-list-local-fallback

Conversation

@dmerand

@dmerand dmerand commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Add shopify store auth list for stores authenticated directly with shopify store auth.

Closes https://github.com/shop/issues-develop/issues/22919

Scope

  • add shopify store auth list
  • list only local store-auth sessions; no organization auth probe and no organization prompt
  • render text output as stores authenticated directly with shopify store auth
  • emit deterministic JSON as {sessions: [...]} with kind: "store" rows so agents can resume without reading cache internals
  • keep access tokens and refresh tokens out of the command output
  • add cross-command hints:
    • store auth list points users to shopify store list for organization stores
    • store list points users to shopify store auth list for direct store-auth sessions
  • keep shopify store list organization-backed only; no --from, no auto, no fallback behavior

Command split

This stack intentionally keeps the two jobs separate:

  • shopify store list lists organization stores using the active CLI account, prompting for organization selection unless --organization-id is provided.
  • shopify store auth list lists stores already present in local store-auth storage.

Not changed / deferred

  • Did not keep store list --from store-auth or --from auto. Those were the source of the confusing mixed-command contract this PR replaces.
  • Did not attempt organization auth or show organization stores from store auth list. That stays in shopify store list.
  • Did not expose access tokens or refresh tokens in store auth list --json. Agents get enough metadata to choose a stored session without reading cache internals; token return would require a separate product/security decision.
  • Did not add the LocalStorage enumeration API suggested in follow-through review. That belongs in a focused cli-kit/storage follow-up, not in the command behavior PR.
  • Did not add E2E evals for “returning to my preview store.” That is tracked separately in https://github.com/shop/issues-develop/issues/22970.

Smoke checks

  • shopify store auth list --json returns local store-auth sessions and does not prompt for organization auth
  • shopify store list --help has no --from flag
  • shopify auth list --help is not registered

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 4, 2026
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 89f393a to 619636c Compare June 5, 2026 13:41
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 1e3e4bc to 770846a Compare June 5, 2026 13:41
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 619636c to 7c049c1 Compare June 5, 2026 14:10
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 770846a to 95d8a71 Compare June 5, 2026 14:10
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 7c049c1 to 52daf1c Compare June 5, 2026 14:24
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 95d8a71 to 04f35fd Compare June 5, 2026 14:24
@dmerand dmerand changed the title Add local source and auto fallback to store list Add store-auth source and auto fallback to store list Jun 5, 2026

dmerand commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor

/snapit

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @nickwesselman! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260605172558

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 04f35fd to 065f5fa Compare June 5, 2026 18:12
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch 2 times, most recently from 00dce2a to 22e4f4a Compare June 5, 2026 18:31
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch 4 times, most recently from c8eed6e to aa58407 Compare June 5, 2026 19:06
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 22e4f4a to 31a07f1 Compare June 5, 2026 19:06
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 451e239 to bc75901 Compare June 8, 2026 18:41
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch 2 times, most recently from c128517 to 9343914 Compare June 8, 2026 19:06
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch 2 times, most recently from a57b2f7 to 996a184 Compare June 8, 2026 19:10
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 9343914 to 81229e4 Compare June 8, 2026 19:10
@dmerand
dmerand marked this pull request as ready for review June 8, 2026 20:56
@dmerand
dmerand requested review from a team as code owners June 8, 2026 20:56
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from ca16bf5 to ed03486 Compare June 11, 2026 02:11
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 7674c38 to 1cb0d3f Compare June 11, 2026 02:11
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from ed03486 to 8d4afd4 Compare June 11, 2026 02:22
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 1cb0d3f to 0c933e5 Compare June 11, 2026 02:22
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 8d4afd4 to a2cf41b Compare June 11, 2026 13:23
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 0c933e5 to a92ad67 Compare June 11, 2026 13:23
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from a2cf41b to 541a4a4 Compare June 11, 2026 13:31
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch 2 times, most recently from de36466 to 8118677 Compare June 11, 2026 15:37
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 541a4a4 to a053144 Compare June 11, 2026 15:37
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 8118677 to 3e869a8 Compare June 11, 2026 15:40
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from a053144 to 489275a Compare June 11, 2026 15:40
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 3e869a8 to d174340 Compare June 11, 2026 16:59
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from 489275a to 9f582a7 Compare June 11, 2026 16:59
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from d174340 to d2cec28 Compare June 11, 2026 17:23
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch 2 times, most recently from 9649fc5 to a151039 Compare June 11, 2026 18:45
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from d2cec28 to 68f4fe4 Compare June 11, 2026 18:45
@dmerand
dmerand force-pushed the donald/store-list-local-auth-seam branch from a151039 to 3755b76 Compare June 11, 2026 19:42
@dmerand
dmerand force-pushed the donald/store-list-local-fallback branch from 68f4fe4 to 3fe6822 Compare June 11, 2026 19:42
@dmerand
dmerand marked this pull request as draft June 15, 2026 14:16
@github-actions

Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/common/string.d.ts
@@ -102,6 +102,16 @@ export declare function formatDate(date: Date): string;
  * @returns The transformed string in local system time.
  */
 export declare function formatLocalDate(dateString: string): string;
+/**
+ * Formats a date as a short calendar date like "May 22, 2026" () in UTC.
+ *
+ * UTC keeps the output deterministic regardless of the machine timezone. Returns an empty string
+ * when the value cannot be parsed into a valid date.
+ *
+ * @param value - A Date, epoch milliseconds, or a date string such as an ISO 8601 timestamp.
+ * @returns The formatted date, or an empty string when the value is invalid.
+ */
+export declare function formatShortDate(value: Date | number | string): string;
 /**
  * Given a list of items, it returns a string with the items joined by commas and the last item joined by "and".
  * All items are wrapped in double quotes.
packages/cli-kit/dist/public/common/url.d.ts
@@ -28,4 +28,13 @@ export declare function extractHost(value: string | null | undefined): string |
  * @param value - A URL or host string, possibly null/undefined.
  * @returns The myshopify subdomain handle, or undefined when the input isn't a  URL.
  */
-export declare function extractMyshopifyHandle(value: string | null | undefined): string | undefined;
\ No newline at end of file
+export declare function extractMyshopifyHandle(value: string | null | undefined): string | undefined;
+/**
+ * Extracts the leading subdomain label from a URL or host, across environments — e.g.
+ * , , or local development hosts — rather than assuming a
+ *  domain.
+ *
+ * @param value - A URL or host string, possibly null/undefined.
+ * @returns The first DNS label, or undefined when no host can be extracted.
+ */
+export declare function extractSubdomain(value: string | null | undefined): string | undefined;
\ No newline at end of file

Comment thread packages/store/src/cli/services/store/auth/list-result.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants