Skip to content
Every tutorial here is 100% free — and always will be
LSLovableStudent

Why isn't my login working?

Last checked 31 Aug 2026

Short answer

Check the browser console for the actual error first — common causes are unconfirmed email, a redirect URL mismatch, RLS blocking the post-login profile read, or a provider (like Google) misconfigured for the current domain.

Diagnose before you guess

"Login isn't working" covers several different failures. Open the browser console and network tab and note the exact error before asking Lovable to fix anything.

Common causes

  • Email not confirmed. If your setup requires email verification, an unconfirmed account will fail to log in even with the correct password.
  • Wrong redirect URL. For Google/OAuth providers, the redirect URI configured for the provider must exactly match the domain you're testing on — this differs between your Preview URL and a published custom domain.
  • RLS blocking a post-login read. Login can succeed but the app then fails to load the user's profile because of a missing SELECT policy, making it look like "login doesn't work" when auth actually succeeded.
  • Testing on the wrong environment. A test/preview environment's auth users are separate from live/published ones — an account created on one won't exist on the other.
  • Session not persisting. If a user is logged in but gets bounced straight back to the login page, this is often a routing/protected-route bug rather than an auth problem.

Step-by-step

  1. Open dev tools, try logging in, and read the exact error from the console/network tab.
  2. Match the error to the categories above.
  3. Ask Lovable with the specific error, not just "login is broken":

Login fails with a 403 right after auth succeeds, when the app tries to fetch the user's profile. Check the RLS policy on profiles for SELECT.

  1. Test with a fresh account and an existing one, and on both preview and published URLs if relevant.

What usually goes wrong

  • Fixing the login form when the real issue is a database policy running afterwards.
  • Not re-testing OAuth providers after adding a custom domain.
  • Assuming a bug is universal when it only affects one environment (test vs live) or one provider (email works, Google doesn't).

If login issues persist after checking all of the above, a fresh pair of eyes from PromptSites.com can be faster than continued trial and error.

Related: /questions/how-do-i-add-login-to-lovable, /questions/how-do-i-add-google-login, /questions/why-is-supabase-returning-a-403-error.

Sources

Was this answer helpful?

Related questions

Website made, maintained and hosted by PromptSites.com

PromptSites logo