Skip to content

Keep multi-user Shopify sessions on the shared token authority - #315

Merged
OziinG merged 1 commit into
mainfrom
codex/shopify-token-authority
Oct 1, 2026
Merged

OziinG merged 1 commit into
mainfrom
codex/shopify-token-authority

Conversation

@OziinG

@OziinG OziinG commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

When several staff members and background workers share a Shopify installation, independent app/server OAuth issuers can invalidate each other's refresh token. This app now delegates the SDK's offline exchange and refresh requests to the Route API's signed, app/shop-scoped token broker. GraphQL/REST transport and browser identity checks stay intact.

Legacy cached sessions converge on their first normal load, including non-expiring sessions. SQLite retains the canonical access token and an opaque refresh routing marker, never the real Shopify refresh token. The duplicate root-loader exchange is removed. Uninstall verifies Shopify HMAC without refreshing a revoked token, waits for a durable server receipt, and preserves sessions when the server identifies a stale uninstall after reinstall. Existing health reporting records broker success and failure without secrets.

Validation: 916 tests including the installed Shopify SDK's exchange/refresh and legacy-cache behavior; typecheck, build, public URL guard, and changed-file lint. A CI source-contract guard detects SDK transport changes. Independent source/contract review approved with no findings. Full lint still reports the pre-existing process no-undef in the unchanged Drivers page.

Deploy only after server PR EVNSolution/clever-route-server#471. Roll out to K-food through the existing manual workflow after exact-main CI; roll back this app before the server. No new dependency, schema, environment, scope, session deletion, or token-lifetime change. Production authenticated smoke follows deployment; multiple real staff accounts are not available locally.

Change control: EVNSolution/clever-change-control#308

@gitguardian

gitguardian Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Route the installed SDK offline OAuth transport through the signed Route API
broker, converge legacy caches on first use, and fence uninstall forwarding.

Constraint: Browser identity checks and Shopify token lifetimes stay unchanged.
Rejected: Repeated root-loader token exchanges | Independent issuers invalidate shared refresh credentials.
Confidence: high
Scope-risk: moderate
Directive: Deploy the server broker first and roll this app back before the broker.
Tested: 916 tests including real SDK transport; typecheck, build, public URL guard, changed-file lint; independent security review.
Not-tested: Production multi-staff browser sessions before deployment; full lint retains a pre-existing process no-undef in the Drivers page.
@OziinG
OziinG force-pushed the codex/shopify-token-authority branch from dc2e663 to 7827e17 Compare October 1, 2026 17:46
@OziinG
OziinG merged commit 536c5f8 into main Oct 1, 2026
2 checks passed
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