Integrating Shopify App Bridge with OAuth Flow

New Member
2 0 0

Hi there,

I am developing an embedded app and am generally pretty confused about how to integrate the Shopify App Bridge React provider component ( with the OAuth flow. Should the App Bridge provider component only be initialised once the embedded app has been installed?

I am currently facing an issue if I wrap my App component with the App Bridge provider using the option:

forceRedirect: true

 When I test installation on a dev store using "Test your app"  in my Shopify Partner dashboard, then it will always redirect to: https://<store-name><api-key> which does not exist yet if the user has not installed the app...

This leads me to think that the Shopify App Bridge provider should be used conditionally (only after the app has been installed for a store). However this seems a little clunky and I haven't before seen this pattern of conditionally applying provider components in React apps. Am I on the right track or way off?