Skip to content

[Prototype] Extract client credentials auth into dev-platform-auth - #8327

Draft
dmerand wants to merge 9 commits into
mainfrom
donald/dev-platform-auth-clientcreds
Draft

[Prototype] Extract client credentials auth into dev-platform-auth#8327
dmerand wants to merge 9 commits into
mainfrom
donald/dev-platform-auth-clientcreds

Conversation

@dmerand

@dmerand dmerand commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

This is an exploratory prototype for extracting the client-credentials flow from cli-kit.

The prototype tests whether a portable package can preserve the CLI request, return shape, error behavior, and security boundary. It is not ready to merge.

WHAT is this pull request doing?

  • Add @shopify/dev-platform-auth with a client-credentials operation.
  • Keep protocol code free of Node and cli-kit imports.
  • Keep cli-kit as an adapter with the existing {token, storeFqdn} return shape.
  • Return typed package results. Pass server codes through serverCode.
  • Keep response bodies, status text, tokens, secrets, and upstream descriptions out of errors.
  • Add direct runtime and transport tests.

The branch also carries the earlier contract fixture and portability prototype work.

How to test your changes?

pnpm --filter @shopify/dev-platform-auth vitest --run
pnpm --filter @shopify/dev-platform-auth build
pnpm --filter @shopify/cli-kit exec vitest run src/public/node/session.test.ts

The existing session.test.ts must remain unmodified.

Post-release steps

None. This is an exploratory draft. Do not merge or publish.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type and added a changeset

Assisted-By: devx/b95434f1-5993-47b3-b56c-380241eff68f
Assisted-By: devx/17376415-2e96-4ea0-9057-0d8f9bfa20da
Assisted-By: devx/17376415-2e96-4ea0-9057-0d8f9bfa20da
Two layers. Layer 1 pins transport request shape plus cited response
structure and status; fixture values are arbitrary fakes. Layer 2 holds
outcome mapping as explicitly provisional, because the package error
taxonomy and cancellation model are undecided.

12 cases, 28 harness self-tests.

Assisted-By: devx/bac322b8-a005-4d5c-96f3-fbfeaf201e7f
Assisted-By: devx/7a9ee065-6614-4654-8965-98d6e969645b
Assisted-By: devx/2371aeae-c1b9-4d35-9684-3974f733db3f
Assisted-By: devx/9eea9b31-7143-4bfb-b4f5-e31a4675e7ee
Assisted-By: devx/e028700d-9b41-468f-aa4c-d283f0afaa61
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Aug 13, 2026
Assisted-By: devx/e60b6dbb-cc8e-4183-a7cd-c957ae861a16
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.

1 participant