[Feature]: added support client credentials in shopify-api-js #2053
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.
WHY are these changes introduced?
WHAT is this pull request doing?
shopify-api
library.What should the reviewers focus on?
token_exchage
andoauth
flows both usecreate_session
file, see that changes do not affect the current behaviour of the library.create_session
now supports expiration for both online and offline tokens.Setup Instructions
partners:dev
spin up partners:dev --wait
Tophatting
Video
Tophatting Client Credentials token acquisition flow
Instructions
appConfig
inshopify.server.js
file looks like thisaccess_token
with no expiry.initiate background job
, in your appclient_credentials
flow fromshopify-api
library and then save it to the database.access_token
with expiry.appConfig
inshopify.server.js
file as followsshopify app dev
again, the app hot reloadsGenerate a Product
button in the app to trigger a server action which will in turn trigger the token acquisition flow as token is missing from db.auth_code
flow as config was updated as suchaccess_token
with no expiry.Type of change
Checklist
pnpm changeset
to create a draft changelog entry (do NOT update theCHANGELOG.md
files manually)