Skip to content

Login works in the Bolt or Replit preview but breaks on the live site: 7 checks

Login works in the Bolt or Replit preview but fails on your live URL? Seven checks in order: env vars, secrets, redirect URLs, OAuth and routes.

Free check first: paste your live login page URL into FunnelSitter's free check. A real browser opens that one page and reports the HTTP status, console errors, broken links, unfinished buttons, load time and a screenshot. No account needed.

To be clear: the free check looks at one page. It does not type a password or log in. Walking the full login flow on a schedule is what a FunnelSitter monitor does, with a free account and a domain you have verified. More in the FunnelSitter FAQ.

Why "works in preview" and "works live" are different things

The preview of a Bolt or Replit app runs with the settings of the builder: its environment variables, its preview domain, its callback URLs. Your live site runs somewhere else, with its own settings. Login touches almost all of them: keys, URLs, cookies and routes. So login is often the first thing that breaks after you deploy, while the homepage loads fine.

Work through the checks in order and stop at the first one that fails. Keep the browser's developer tools open on the Network and Console tabs while you try to log in on the live URL in a private window.

The 7 checks

1. Are the environment variables there in production? If your app talks to Supabase or another backend, it needs its URL and key in the live environment too. If you deploy a Bolt app to Netlify, Netlify's guide says Bolt keeps variables in its own environment and Netlify doesn't see them until you add them. Client-side code only sees variables with the framework's prefix (VITE_ for Vite, NEXT_PUBLIC_ for Next.js). Rebuild after adding them, because they are baked in at build time. A sign of this problem: the login request to your backend never fires, or the console shows "undefined" for a URL or key.

2. On Replit: are the secrets in the Publishing pane? Replit's troubleshooting guide lists missing production Secrets as a cause of login and payment errors on published apps, and says to add them in the Publishing pane. Open it, check that every secret your login needs is there, then republish. The deployment Logs tab shows errors about missing environment variables.

3. Does your auth provider know your live domain? If you use Supabase Auth, open Authentication → URL Configuration. Supabase's docs say the Site URL is the default redirect when the code doesn't pass one, and it matters for email confirmations and password resets. Change it from http://localhost:3000 to your live URL, and add your live domain (and custom domain) to Redirect URLs. If users land on localhost or back on the start page after logging in, it's usually this. If it's the password-reset email that opens localhost or says the link has expired, see Password reset link opens localhost, or says it is invalid or expired.

4. Google, GitHub or other social login: is the live callback URL allowed? OAuth providers only send users back to callback URLs you registered. Add the exact production callback (custom domain included, https, no stray trailing slash) in the provider's console. A redirect_uri_mismatch error points here. Replit's docs for apps using its Clerk-based auth say to copy every value shown in the Auth pane, published and custom domain both. Google sign-in also doesn't work inside in-app webviews, so test in a normal browser.

5. Do deep links and callback routes load at all? Open your callback page (for example /auth/callback) and a protected page (for example /dashboard) directly in a new tab. If they 404 on the live site but work when you click through from the homepage, your host isn't sending single-page-app routes to index.html. On Netlify that is the /* /index.html 200 rule. On Replit, the docs say a Static deployment is the wrong type for apps with authentication callbacks or server routes. Switch to Autoscale.

6. Does the session survive a reload? Log in, then hard-refresh. If you are logged out again, the session isn't being stored. Common causes are cookies set for the preview domain and a sign-in client that gets created again on every render.

7. Logged in, but everything is empty? If login succeeds but the pages show no data, you are signed in and the database rules (for example Supabase row-level security) aren't letting the user read their rows. Fix the policy. Don't switch the security off.

After it's fixed: keep catching it

  • After every AI edit or deploy, run the free check on your live login page. It shows console errors and a screenshot in one paste.
  • To have login checked for you, a FunnelSitter monitor follows steps you describe (visit, click, fill, submit, check the text or URL) on a domain you have verified. It re-checks before it emails you, then sends a screenshot, a plain-language explanation and a fix prompt you can paste into Cursor or Lovable.

Limits worth knowing

  • FunnelSitter's bot can't solve captchas. A login step behind a captcha fails.
  • It can't finish email-confirmation or magic-link steps, because its example.com test addresses get no mail. Password login can be monitored. A login that only works through an emailed link can't.
  • Test accounts a monitor creates stay in your app.

FAQ

Does the free check test my login? No. It loads one page and checks its health: status, console errors, broken links, unfinished buttons, load time and a screenshot. Testing the login flow needs a monitor and a verified domain.

Why does login send me to localhost after deploying? Most often the Site URL or Redirect URLs in your auth settings, or the OAuth callback in Google's console, still point at localhost or the preview domain. Update them to the live domain and test again in a private window.

Does this only apply to Bolt and Replit? No. Lovable, Cursor and v0 apps can have the same preview-vs-live gaps. The checks are the same.

Run the free check on your live login page