App Proxy access scopes not updating with the main app's access scopes

Solved

App Proxy access scopes not updating with the main app's access scopes

devguy
Shopify Partner
2 0 1

I am developing a theme app extension (using the Remix CLI template), which is in turn loading a React app in a store page (for the user to interact with). 

 

This React app needs data from the store's database, and it seems the only way to get this done is through an app proxy, wherein I have created my own API server which, after validating the query is coming from Shopify, proceeds to query the Shopify GraphQL API.  (FWIW, I tried simply creating some Remix routes to do the Shopify DB query, but was unsuccessful getting it working that way.  If that's the better approach, I'm open to pointers there, too...)

 

So far, this is working, except that I need to add scopes to the overall solution so I can not only query data, but also update Collections.  I've added the scopes to my Remix app's shopify.app.toml file and redeployed the app.  The app proxy, however, does not seem to acquire the new scopes (verified by having the app proxy query for currentAppInstallation.accessScopes.handle - only read-access handles are returned).

 

Any idea what's going on with this, and how to resolve it?

Accepted Solution (1)

ShaunStarttin
Shopify Partner
20 3 4

This is an accepted solution.

Probably a stale session record in your db, as described here.

 

Uninstalling and reinstalling the app on your store should work, but if not you can reset the DB and reinstall the app on the store.

View solution in original post

Replies 2 (2)

ShaunStarttin
Shopify Partner
20 3 4

This is an accepted solution.

Probably a stale session record in your db, as described here.

 

Uninstalling and reinstalling the app on your store should work, but if not you can reset the DB and reinstall the app on the store.

devguy
Shopify Partner
2 0 1

Thanks for the pointer to that document.  It turned out to be something simpler - I had updated in the scopes in my theme app extension's TOML file, but needed to update the API access in the dev store's app configuration.  I would have expected this to happen automatically when I uninstalled/reinstalled the app to the dev store, but apparently not.

 

Regardless, your info put me on the path to figure it out, so I'll accept it as the solution. 

 

Thanks again!