SatelCreative / spylib

A library to facilitate interfacing with Shopify's API
https://satelcreative.github.io/spylib
MIT License
3 stars 2 forks source link

Shopify OAuth change #220

Open lishanl opened 5 months ago

lishanl commented 5 months ago

What doesn't work

We used to be able to do the Shopify OAuth app installation by entering the URL in the browser: https://<app_domain>/shopify/auth?shop=<store_name> which should then directs us to a screen to authorize and complete the installation.

But this time when I was installing the st pricing engine app, it directs me to a screen below

What works

Instead, to install it, we need to use the installation link generated by Shopify for the app while the app url needs to point to the /shopify/auth route

App Distribution:

App Configuration:

The Shopify installation link will first direct user to a screen to select which store to install the app to, after selecting the store, the user will be directed to following installation screen to complete the installation.

But after the installation, I need to change the App URL to point to /health instead so that when the app is being loaded from the store. It returns a happy state.

It feels like we can modify the init oauth router to detect https://github.com/SatelCreative/spylib/blob/b8f67ba8c5873eb2fef90f6059568a20753914b0/spylib/oauth/fastapi.py#L32-L44

lishanl commented 5 months ago

FYI ant @hillairet