Repository navigation
fix(oauth): accept a customer account extension token's iss on its shop - #35
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 0xtlt/openshop-rust#83: customer account UI extension tokens (
iss: https://{shop}.myshopify.com/checkouts) were refused byverify_extension_session_token.Rule (extension path only): an
iss, when present, must behttps://{shop}.myshopify.com/followed by a non-empty path,{shop}being the shop ofdest. Noissstill passes (checkout extensions).https://{shop}.myshopify.com.evil.example/…),http://, a port, the bare origin (with or without/)./checkouts,/admin, …).verify_session_tokenis unchanged:issexactly{origin}/admin. A test now pins that/checkoutsfails there./checkoutsvalue 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