You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a custom Shopify app that handles installation by the shop domain.
flow works like this:
the merchant enters shop domain (abcd.myshopify.com)) in form in my app example.com/install
then redirected to Shopify for approval,
then back to my app URL where I exchange the $_GET['code'] for an access token and complete installation.
After that, redirects to the app preview page on shopify iframe app view. https://admin.shopify.com/store/abcd/apps/abcd-plugin-app
The problem happens when the app is uninstalled and then reinstalled from Apps > Uninstalled. In this case, Shopify does not redirect to my app URL again, It just goes to the app iframe view, and no $_GET['code']parameter is provided, so I cannot regenerate an access token.
It gives these params in iframe view 'embedded', 'hmac', 'host', 'id_token', 'locale', 'session', 'shop', 'timestamp'
Questions:
How should access tokens be regenerated when an app is reinstalled from the Uninstalled tab?
Alternatively, is there a way to prevent the app from being reinstallable from the Uninstalled list and require installation only via the app URL? (like the Shopify GraphiQL App)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to build a custom Shopify app that handles installation by the shop domain.
flow works like this:
(abcd.myshopify.com)) in form in my appexample.com/install$_GET['code']for an access token and complete installation.https://admin.shopify.com/store/abcd/apps/abcd-plugin-appThe problem happens when the app is uninstalled and then reinstalled from Apps > Uninstalled. In this case, Shopify does not redirect to my app URL again, It just goes to the app iframe view, and no
$_GET['code']parameter is provided, so I cannot regenerate an access token.It gives these params in iframe view
'embedded', 'hmac', 'host', 'id_token', 'locale', 'session', 'shop', 'timestamp'Questions:
How should access tokens be regenerated when an app is reinstalled from the Uninstalled tab?
Alternatively, is there a way to prevent the app from being reinstallable from the Uninstalled list and require installation only via the app URL? (like the Shopify GraphiQL App)
Beta Was this translation helpful? Give feedback.
All reactions