App/grant on new app install flow

Can someone explain how the app/grant redirection work? My app submission fails the check: Authenticate immediately after install.

I am redirecting to /app/grant url immediately after install click. I see /app/grant giving 200.

But I see a lot of network calls after that and finally I see a shopify 404 screen saying There’s no page at this address
Check the URL and try again, or use the search bar to find what you need.

Does /app/grant automatically take the use to the page where they can approve the installation with the scope? Or should the app handle that by using oauth/authorize flow by redirection?

After I redirect to /app/grant, app does not have any control. Why am I seeing a 404 shopify page instead of the grant page? I am using the test store from the partner dashboard for testing.

Duplicate of this: Immediate redirection after Install - Latest check

Thank you @KyleG-Shopify . I did not use the api library but it works now with manual auth.

The problem was with the way check is done during app submission.

Suggestion for the developers of this check:

Please use a different store for every run. I can see retries and that is ok. But the problem is when we click on Run button. Looks like we are using the same store to test this check.

What is the problem with this?
Assume the installation fails in some flow but the store and access token in stored. So, installation is not complete but the access token is stored in the DB.

Now if I click on run again, the redirection to app/grant is not generated as the store is already authenticated. Unless the db entry is manually deleted, the check keeps failing.

There might other such nuances too.

1 Like