Hi @George_Drakakis,
This is actually expected behaviour, that Public Apps and Partner Custom Apps do need to have the merchant approve any access scopes that the app requires, with the approval taking place during the app installation process and after updating any scopes that the app requires later on, as mentioned in Shopify.dev documentation:
This is by design to ensure that merchant’s installing apps that they are not creating or are managing themselves, are able to review and approve any scopes that the app requires since it is giving permission to access certain data on their store.
The reason this step was not required with Legacy Custom Apps, is because they were created in the Merchant’s Admin directly, and needed to be created with a Merchant Staff or Partner Collaborator Account that already had the permissions required on the store with the account creating the app itself.
That all said, there is a new process for Custom App Authentication called Client Credentials Grant that replaces the old method of authentication with legacy apps.
This authentication method is definitely simpler than the Authorization Code Grant workflow, as you just make a POST https://{shop}.myshopify.com/admin/oauth/access_token request with the Client ID and Client Secret in the request parameters, and does not require the merchant to approve the scopes themselves.
However you can only use this method, with a Custom App created in the Dev Dashboard from an account that belongs to the organization the app is installed on. Meaning:
- A Merchant Staff Account (not a Partner Collaborator Account) must create the app in the Dev Dashboard, in order to use Client Credentials Grant on the Merchant’s store.
- A Partner Account must create the app in the Dev Dashboard, in order to use Client Credentials Grant on a Partner Development store.
TLDR:
- If you do not want the merchant to have to approve any access scopes used with the app installed on the store, you have to use Client Credentials Grant with a Custom App installed on the store
- Public Apps cannot use this process and must use Authorization Code Grant, or Session Token Exchange, and requires the merchant to approve the scopes used.
- If you use Client Credentials Grant with a Custom App, the app has to be created via a Merchant Staff’s account logged into the Dev Dashboard. You can walk them through this process, and have them provide you with the Client Id and Client Secret displayed in the Dev Dashboard to use Client Credentials Grant.
Edit:
I apologize as I was incorrect with some of the information above, with a Custom App the merchant creates in the Dev Dashboard and installs on their store, they do still need to approve the access scopes requested in the app configuration (in the Dev Dashboard or the app’s .toml file)
When the merchant installs the app, they will be requested to approve the scopes, and when the scopes are updated the next time the merchant access the app in the admin they will be requested to approve the scopes.
While Client Credential Grant is definitely a simpler method of authentication, it does still require the merchant to manually approve the scopes the app needs. There is no way around this limitation at this time.