Thanks - for others coming along here, here’s how I’m dealing with this:
-
Receive request from the Shopify App store: www.mydomain.com?shop=usershop.myshopify.com&hmac=1234567
-
Initial the oAuth request, passing the shop domain
-
Capture the oAuth credentials response, save the token to the DB (without tying it to any of my users, since I don’t know who’s logged in yet)
-
Ask the user to log in
-
Once logged in, associate the previously saved token to the now logged in user.