Skip to content

Conversation

blazerunner44
Copy link

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.

Copy link
Contributor

@jeroendelau jeroendelau left a comment

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.

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.

2 participants