[Bug]: Authentication Loop with Shopify App (Remix Template)
Please confirm that you have:
- [x] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
- [x] Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?
App
Expected behavior
After running shopify app dev, clicking on the preview URL should: Open the browser at https://y-brush-test-stock.myshopify.com/admin/oauth/redirect_from_cli?client_id=[ID] Redirect to Shopify Admin authentication page After successful OAuth authentication, redirect to https://[tunnel-url]/app?shop=y-brush-test-stock.myshopify.com Load the app's main interface within the Shopify Admin panel
Actual behavior
Instead, the following loop occurs: Preview URL opens correctly Initial redirect to Shopify Admin works After OAuth, redirects to https://[tunnel-url]/app?shop=y-brush-test-stock.myshopify.com Server responds with 302 redirect to '/auth/login' Browser follows redirect to login page Entering shop domain "y-brush-test-stock.myshopify.com" Steps 3-6 repeat indefinitely, creating an infinite authentication loop Server logs consistently show: Shop détecté dans l'URL: y-brush-test-stock.myshopify.com Tentative d'authentification pour http://[tunnel-url]/app?shop=y-brush-test-stock.myshopify.com Erreur d'authentification ignorée: Response { status: 302, statusText: '', headers: Headers { Location: '/auth/login' } }
Verbose output
Verbose output
11:15:45 │ remix │ [shopify-api/INFO] version 11.12.0, environment Remix 11:15:46 │ remix │ Shop détecté dans l'URL: y-brush-test-stock.myshopify.com 11:15:46 │ remix │ Tentative d'authentification pour http://[tunnel-url]/app?shop=y-brush-test-stock.myshopify.com 11:15:46 │ remix │ Erreur d'authentification ignorée: Response { 11:15:46 │ remix │ status: 302, 11:15:46 │ remix │ statusText: '', 11:15:46 │ remix │ headers: Headers { Location: '/auth/login' }, 11:15:46 │ remix │ body: null, 11:15:46 │ remix │ bodyUsed: false, 11:15:46 │ remix │ ok: false, 11:15:46 │ remix │ redirected: false, 11:15:46 │ remix │ type: 'default', 11:15:46 │ remix │ url: '' 11:15:46 │ remix │ }Reproduction steps
Create new Shopify app using Remix template Configure app in Shopify Partners with ngrok URLs or cloudflare Run shopify app dev Click Preview URL Enter dev store domain Observe authentication loop
Operating System
macOS Sequoia 15.4
Shopify CLI version (shopify --version)
3.78.1
Shell
/bin/zsh
Node version (run node -v if you're not sure)
v22.12.0
What language and version are you using in your application?
Node.js with: - Remix v2.16.5 - @shopify/shopify-app-remix v3.8.2 - @remix-run/dev v2.16.5 - @remix-run/node v2.16.5 - @remix-run/react v2.16.5
Hi @antilope63 -- sorry you're having this issue. I've just tested with your reproduction steps -- so, a fresh Remix app and running shopify app dev -- and I am not seeing this issue.
Is your app a freshly cloned one? You mention "Enter dev store domain" -- this is a red flag to me that something isn't like the out of the box experience. That screen shows when your app is loaded from outside of the admin.
You also mention "Configure app in Shopify Partners with ngrok URLs or cloudflare" -- if you're using shopify app dev then usually you would not do this yourself. If you have done this yourself, double-check your configuration.
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.