OAuth issue with decoupled backend and frontend for embedded shopify app

Tried to get oauth flow work, but no way to understand what is happening.
Made a tunnel url, redirect_urls with the same host. Tried to install app, got 1 request, but no callback at all on my redirect_url. It is in the url, but no request from shopify oauth back.
Please clear it up for me.

Are you using Shopify managed installation? There is no callback on Shopify managed installation.
Please check the difference here.

1 Like

Yeah, I’m using Shopify Managed Installation. If there is no callback, how to trigger oauth flow? Also Shopify has online and offline tokens, so as developers we need to make offline flow during installation and then make online flow, but how to do it without any callbacks sent?

If there is no callback, how to trigger oauth flow?

Authorization code grant flow

Step 1: Verify the installation request
Step 2: Step 2: Request authorization code
Step 3: Validate authorization code
Step 4: Get an access token
Step 5: Redirect to your app’s UI
Step 6: Make authenticated requests

Shopify managed installation flow

Step 1: Ensure you have a valid session token
Step 2: Get an access token
Step 3: Make authenticated requests

What you need to do:
You need to exchange session token for an access token using token exchange.

so as developers we need to make offline flow during installation and then make online flow

No.
Online access tokens and Offline access tokens are different. You should need offline access token.

So there is no need to manage offline and online flow? Shopify sends all as query params to my application url. But what if token is expired, should I redirect to offline flow?