Skip to content

PROTO: Add shopify store logout#7185

Draft
dmerand wants to merge 1 commit intodlm-store-auth-infofrom
dlm-store-auth-logout
Draft

PROTO: Add shopify store logout#7185
dmerand wants to merge 1 commit intodlm-store-auth-infofrom
dlm-store-auth-logout

Conversation

@dmerand
Copy link
Copy Markdown
Contributor

@dmerand dmerand commented Apr 3, 2026

What

Add shopify store auth logout to clear locally stored store auth for a store.

This is a local-only logout surface for the store-auth flow. It removes the cached auth state on this machine and leaves remote app access unchanged.

Why

shopify store auth and shopify store auth info make local store auth visible and reusable, but there is not yet a way to clear that state intentionally.

That makes it awkward to reset local auth during debugging, to switch identities cleanly, or to force a fresh store auth run without manually editing CLI storage.

How

  • add shopify store auth logout --store <shop>
  • normalize the store before lookup and deletion
  • keep the command idempotent when no local auth exists
  • clear the full local auth bucket for the store so logout does not silently fall through to another cached user for the same store
  • keep the command text-only for now; broader --json support across shopify store * stays in follow-up work

Considered

  • Clearing only the current stored user for the store. Rejected. That can leave another cached user active for the same store, so the CLI is not actually logged out.
  • Remote revoke/uninstall behavior. Rejected. This command is only about local CLI state.
  • Adding --json in this PR. Deferred. We want to design the JSON contract across the full shopify store * surface after the logout shape settles.
  • Adding broader follow-up surfaces such as store auth list in this PR. Deferred so this change stays focused on local reset behavior.

How to test your changes?

  1. Authenticate against a store:
    pnpm shopify store auth --store donaldmerand.myshopify.com --scopes write_products
  2. Confirm local auth exists:
    pnpm shopify store auth info --store donaldmerand.myshopify.com
  3. Clear the local auth:
    pnpm shopify store auth logout --store donaldmerand.myshopify.com
  4. Run the info command again and confirm there is no longer any locally stored auth for that store:
    pnpm shopify store auth info --store donaldmerand.myshopify.com
  5. Re-run shopify store auth and confirm a fresh local auth flow works.

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

Copy link
Copy Markdown
Contributor Author

dmerand commented Apr 3, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dmerand dmerand changed the title Add shopify store logout PROTO: Add shopify store logout Apr 3, 2026
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