Update action to use Dev Dashboard apps#102
Merged
graygilmore merged 2 commits intomainfrom Mar 17, 2026
Merged
Conversation
The exit code was captured after set -e, meaning $? always reflected the exit status of 'set -e' itself (always 0) rather than curl's exit code. This made the HTTP error check dead code — a failed curl would never trigger the error log. Move 'local exit_code="$?"' before 'set -e' so it captures curl's actual exit status, matching the correct pattern already used in fetch_access_token.
As of January 2026, Shopify no longer allows creating new custom apps. New apps are created through the Dev Dashboard and authenticated with a client_id + client_secret, which are exchanged for a short-lived access token via the client_credentials OAuth grant.
Changes: - action.yml: add client_id and client_secret inputs; mark access_token as legacy - entrypoint.sh: add fetch_access_token() that POSTs to /admin/oauth/access_token; replace the static auth block with a 4-branch resolver (client_id+secret preferred, partial-pair error, legacy access_token fallback, no-auth error); use ${VAR:-} syntax throughout to be safe under set -u - README.md: restructure auth docs with Dev Dashboard as the recommended path and legacy custom app as the secondary path; update primary usage example
62ae80d to
98d4917
Compare
stephanie-shopify
approved these changes
Mar 12, 2026
|
Thanks for addressing this 😄 |
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.
SHOP_ACCESS_TOKEN#99Custom apps as we know them are being phased out. As of January 1, 2026 new custom apps cannot be created. Instead, apps need to be created through the Dev Dashboard. A big difference here is that the Dev Dashboard does not directly provide API tokens. Instead, you get a Client ID and Secret that you use to fetch short-lived tokens on the fly.
This PR updates this action to utilize those tokens if set as well as update the documentation. It also includes a bonus commit for a little fix to the order of operations to fix an exit code.