OAuth flow is redirecting to the store's admin Home, not redirecting to callback URI

Topic summary

A non-embedded Shopify app’s OAuth flow is malfunctioning after uninstalling from a development store.

Current behavior:

  • OAuth initiates normally and redirects to Shopify login
  • After login, users land on the store’s admin Home screen instead of the app installation/scope confirmation page
  • The callback URI is never reached, preventing session storage

Key details:

  • Previously worked correctly before uninstalling
  • Issue persists even when reverting to older code versions
  • No error logs or messages are visible
  • App may be unable to reinstall (potentially related issue)

Technical context:

  • Using Next.js with @shopify/shopify-api npm package (version 7.7)
  • Non-embedded app configuration with isEmbeddedApp: false
  • Standard OAuth flow implementation with shopify.auth.begin() method

Status: Unresolved. The developer is seeking help understanding why the redirect behavior changed and how to restore proper OAuth callback functionality.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

We’re having a bit of an odd issue. We have a non-embedded app that’s integrating with Shopify through the OAuth flow. This used to work but ever since uninstalling the app from our development store, we are unable to uninstall it again (may be related, but may not be).

What happens is:

  1. User starts OAuth flow from our website
  2. User is redirect to Shopify login screen
  3. When user logs in, they are redirected to the shop’s admin portal, specifically the “Home” screen
    1. This is where we were previously asked to confirm installing the app with it’s requested scopes, but this is no longer happening
    2. It also means it is never redirecting back to our callback URI, so we cannot store the session

We’re super confused as to why this is happening. I can’t find any logs or errors anywhere. It’s especially weird because this used to work, and even going back to a previous version of our website, it still shows the same behaviour.

We are using Next.js, as well as the @Shopify_77 /shopify-api NPM package. This is our code for starting the OAuth flow:

import "@shopify/shopify-api/adapters/cf-worker";
import { shopifyApi } from "@shopify/shopify-api";
import { NextResponse } from "next/server";
import { SHOPIFY_APIVERSION } from "@/utils/supabase/constants";

const shopify = shopifyApi({
  apiKey: process.env.SHOPIFY_CLIENT_ID,
  apiSecretKey: process.env.SHOPIFY_CLIENT_SECRET!,
  scopes: ["read_products"],
  hostName: process.env.SEAMLESSLY_HOSTNAME!,
  hostScheme: "https",
  apiVersion: SHOPIFY_APIVERSION,
  isEmbeddedApp: false,
});

export default shopify;

export function beginShopifyAuth(
  shop: string,
  req: Request,
  isOnline: boolean
) {
  return shopify.auth.begin({
    shop,
    callbackPath: "/api/shopify/auth/callback",
    isOnline,
    rawRequest: req,
    rawResponse: new NextResponse(),
  });
}

Thanks in advance, looking forward to anyone’s ideas.