Skip to content

Add support for the client credentials grant OAuth flow - #1268

Merged
nozzlegear merged 2 commits into
masterfrom
client-credentials-grant
Sep 17, 2026
Merged

nozzlegear merged 2 commits into
masterfrom
client-credentials-grant

Conversation

@nozzlegear

Copy link
Copy Markdown
Owner

This commit adds a new GetClientCredentialsAccessTokenAsync method to the ShopifyOauthUtility, which implements the client credentials grant flow required by custom Shopify apps. These client credentials expire after 24 hours, but the flow does not return a refresh token – instead, devs just call the same grant method again, which automatically refreshes the token.

Closes #1225

Comment thread ShopifySharp/Utilities/ClientCredentialsAccessTokenOptions.cs Outdated
Comment thread ShopifySharp/Utilities/ShopifyOauthUtility.cs
@nozzlegear
nozzlegear force-pushed the client-credentials-grant branch 2 times, most recently from 3b28dde to 0f76d49 Compare September 17, 2026 04:43
This commit adds a new `GetClientCredentialsAccessTokenAsync` method to
the `ShopifyOauthUtility`, which implements the client credentials grant
flow required by custom Shopify apps. These client credentials expire
after 24 hours, but the flow does not return a refresh token – instead, devs
just call the same grant method again, which automatically refreshes the
token.

Added a new ShopifyAccessTokenType.ClientCredentials enum case to
represent the new access token type. The AuthorizationResult's refresh
methods have been updated to throw when given the new token type, which
cannot be refreshed.

type: feature
scope: oauth, utilities
The interface explicitly shows that this method can return
`AuthorizationResult?`, but the implementation's return type was just
`AuthorizationResult`.

type: fix
scope: utilities
@nozzlegear
nozzlegear force-pushed the client-credentials-grant branch from 0f76d49 to 999a655 Compare September 17, 2026 04:46
@nozzlegear
nozzlegear merged commit 1d7d003 into master Sep 17, 2026
2 checks passed
@nozzlegear
nozzlegear deleted the client-credentials-grant branch September 17, 2026 04:49
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.

Request access token for custom apps created using Dev Dashboard from 2026

1 participant