How to link / auth a merchant's Shopify account to separate third-party native mobile app (Okta?)

Highlighted
Explorer
101 7 14

I am working on a native mobile app that will require linking my app with the merchant's Shopify account. The user will download the app after they've already installed my Shopify app, so let's assume that the merchant has already gone through the OAuth process on Shopify web and I have an access token for them. My understanding the Mobile Buy SDK is for customers of merchants, and not for my use case - is that correct? 

I'm just beginning my research process, but is there any kind of library compatible with Shopify where a user downloads the mobile app, it prompts them to open a browser to have them authenticate (perhaps re-generating the Shopify permissionUrl) and then redirects them BACK to the mobile app at that point as authenticated? It seems Okta has SDKs for this - if so, can I employ the same redirecturi for both my web experience and also that of native mobile?

My other idea was to create a Firebase user for the Shopify merchant on my back-end after they authorize my Shopify app on web. Then, when they open my mobile app for the first time they're prompted to enter their shopOrigin (or shop email address), and I'll email them a one-time use login passcode. They would paste in that password as their password field and I would log them in at that point using Firebase authentication.  This seems simpler but also lazier and less elegant. 

Has anyone done anything like this? Thank you.

0 Likes