Skip to content

fix(oauth): accept a customer account extension token's iss on its shop - #35

Merged
0xtlt merged 1 commit into
masterfrom
fix/extension-token-iss
Nov 14, 2026
Merged

0xtlt merged 1 commit into
masterfrom
fix/extension-token-iss

Conversation

@0xtlt

@0xtlt 0xtlt commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Fixes 0xtlt/openshop-rust#83: customer account UI extension tokens (iss: https://{shop}.myshopify.com/checkouts) were refused by verify_extension_session_token.

Rule (extension path only): an iss, when present, must be https://{shop}.myshopify.com/ followed by a non-empty path, {shop} being the shop of dest. No iss still passes (checkout extensions).

  • Refused: another shop, a lookalike host (https://{shop}.myshopify.com.evil.example/…), http://, a port, the bare origin (with or without /).
  • Not checked: the path itself (/checkouts, /admin, …).
  • verify_session_token is unchanged: iss exactly {origin}/admin. A test now pins that /checkouts fails there.
  • Rustdoc notes that the /checkouts value comes from a dev store observation, not Shopify's docs.

Gate run locally: mise run check (fmt, clippy -D warnings, tests, docs, features alone), MSRV 1.88, cargo package.

🤖 Generated with Claude Code

…shop

`verify_extension_session_token` required an `iss` of exactly
`{origin}/admin`, so customer account UI extension tokens, whose `iss` is
`https://{shop}.myshopify.com/checkouts`, were refused. An `iss` on the
extension path now passes when it is the origin of `dest`'s shop followed by
`/` and a path. `verify_session_token` keeps requiring `{origin}/admin`.

Refs 0xtlt/openshop-rust#83

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xtlt
0xtlt merged commit ec24842 into master Nov 14, 2026
6 checks passed
@0xtlt
0xtlt deleted the fix/extension-token-iss branch November 14, 2026 10:00
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.

Customer account extension tokens refused: iss is https://{shop}/checkouts, not /admin

1 participant