Integrating Shopify App Bridge with OAuth Flow

Integrating Shopify App Bridge with OAuth Flow

2 0 1

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?


Reply 1 (1)

Shopify Partner
1 0 0

I am facing the exact same issue - I feel like I am missing something in the way I setup my app OAuth flow and like Plutonian has mentioned, conditionally using the App Bridge Provider seems a bit clunky...