Our app is non-embedded and uses the classic Authorization Code Grant flow:
Shopify → /auth (302)
/auth → Shopify OAuth authorize (303)
Authorize → /auth/callback (302)
/auth/callback → our app homepage (200)
Technically this works fine, but the automatic check keeps failing on these two items:
Verify identity immediately after installation
Redirect to app UI immediately after verification
The error says:
During automatic check your app did not start install-time identity verification and returned an unexpected URL. Expected:https://admin.shopify.com/store/uvszh1-m5/app/grant Actual:https://a32333127.ngrok-free.app/auth?hmac=...&host=...&shop=...×tamp=...
Question:
Since I must hit /auth first to obtain the Shopify OAuth authorize URL, why is this step being flagged?
What should I change (or document) to pass the check?
Any help appreciated—thanks!
But only by going through /auth first can we generate the Shopify OAuth authorization URL with the required permission scopes. Then the Shopify OAuth authorization page displays the /grant page. If we don’t go through the /auth endpoint, how would the system know what permissions the app needs to request? For example, permissions for products, customer data, etc.
import type { LoaderFunctionArgs } from “@remix-run/node”;
import { redirect } from “@remix-run/node”;
import { authenticate } from “../shopify.server”;