Skip to content

Fix for checkout ui session tokens - #452

Merged
Kyon147 merged 1 commit into
Kyon147:masterfrom
blazerunner44:bug-fix-checkoutui-session-tokens
Nov 7, 2025
Merged

Fix for checkout ui session tokens#452
Kyon147 merged 1 commit into
Kyon147:masterfrom
blazerunner44:bug-fix-checkoutui-session-tokens

Conversation

@blazerunner44

Copy link
Copy Markdown
Contributor

This is a quick fix for an issue discussed on PR #329

It appears Shopify now issues the iss field on Checkout UI session tokens, breaking the current determineTokenSource method.

This PR removes the iss field check and relys solely on the presence of the sid field to determine if the SessionToken comes from the app or checkout ui.

According to the Shopify documentation, they define the sid as:
sid: A unique session ID per user and app.
Shopify docs

Therefore, it makes sense that a sid wouldn't be issued for a checkout/account UI extension as there's no authenticated Shopify user using the app.

@jeroendelau jeroendelau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, but does this pass the tests? Probably they also need a small edit.

@Kyon147

Kyon147 commented Oct 16, 2025

Copy link
Copy Markdown
Owner

@blazerunner44 thanks for the PR, I've kicked off the tests but can you confirm this is backwards compatible in your testing?

@Kyon147 Kyon147 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good for now - the docs look like they are still out of date https://shopify.dev/docs/api/checkout-ui-extensions/latest/apis/session-token but as you say it does assume that checkout extension do not have a sid

@Kyon147
Kyon147 merged commit 9854480 into Kyon147:master Nov 7, 2025
18 checks passed
@blazerunner44
blazerunner44 deleted the bug-fix-checkoutui-session-tokens branch March 5, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants