StackMatch

Supabase "Invalid login credentials" in a Lovable or Bolt app: fixes (2026)

Prices and facts checked on each tool's official site. Plans change often, so confirm before you pay.

Someone types their email and password into your Lovable or Bolt app and gets Invalid login credentials, sometimes even when you're sure the password is right. The error code is invalid_credentials with HTTP status 400. Here's how to find out which of the few real causes it is.

What the error means

Supabase's sign-in server returns the exact same message, Invalid login credentials, in three different cases: there's no user with that email, the user exists but has no password, or the password is wrong. It's deliberately vague so strangers can't test which emails have accounts. Supabase also only checks whether the email is confirmed after the password matches; in that case you get Email not confirmed instead.

Match the situation to the cause

What you seeMost likely cause
Works in preview, fails on the live site (or the other way round)The two use different Supabase projects, so the account only exists in one of them
The user first signed up with Google or a magic linkThat account has no password, so password sign-in always fails
You can see the user in your app's own users or profiles table, but not in Authentication, UsersThe AI built its own sign-up table instead of using Supabase Auth
Only on phones, or only for some peopleAn extra space from autofill or the keyboard in the email or password
Right after sign-up, with the right passwordNormally Email not confirmed; Invalid login credentials here usually means the sign-up never created the account
It used to work, then a password change "didn't stick"The reset flow never actually saved the new password

Step 1: find the user in Supabase

Open the Supabase Dashboard for the project your published app really uses (compare the project URL in your app's settings with the one in the dashboard) and go to Authentication, Users. Search for the email. Supabase looks emails up in lowercase, so capital letters don't matter.

  • Not there: go to step 2.
  • There, and the provider is Google (or another sign-in method) only: go to step 3.
  • There with email as a provider: it's the password, go to step 5.

2. The account isn't in this Supabase project

The most common reason is two projects: the preview uses one Supabase project and the live site another, or the app was moved from Lovable Cloud to your own Supabase. Accounts don't copy across. Make the published build use the same Supabase URL and anon key as the project where your users are, then republish. Our works in preview but broken after publishing guide covers the settings.

The other reason: the AI wrote its own sign-up that saves emails and passwords into a regular table, so Supabase Auth never knew about the user. Ask it to use supabase.auth.signUp and supabase.auth.signInWithPassword, and never store passwords in your own tables.

3. Google or magic link accounts have no password

A user who signed up with Google has no password in Supabase, so an email and password sign-in for that address fails with Invalid login credentials. Supabase's docs also note that if someone tries to create an email account after signing up with Google using the same email, they get a hidden "fake" response and no confirmation email. Show the Continue with Google button clearly on your sign-in page, and add a hint like "Signed up with Google? Use that button." If Google sign-in itself is failing, see our Google sign-in guide.

4. Email not confirmed is a different problem

If the message is Email not confirmed, the password was right but the user never clicked the confirmation link. Usually the email never arrived. Our Supabase auth emails not sending guide fixes that. For a test account you can confirm the user by hand in Authentication, Users.

5. The password really doesn't match

Trim spaces from the email and password before sending them, since phone keyboards and autofill often add one. Give users a Forgot password link that calls supabase.auth.resetPasswordForEmail, and a page that saves the new password with supabase.auth.updateUser. Supabase says resetPasswordForEmail doesn't reveal whether an account exists, so always show "If an account exists, we've sent a link." If people reset and still can't log in, the reset page probably never calls updateUser, or the reset email link points to localhost; check your Site URL in Authentication, URL Configuration.

What to paste into Lovable or Bolt

Users get "Invalid login credentials" when signing in on [preview / the published site]. Don't change any code yet. First tell me: which Supabase project URL the preview and the published build each use, whether sign-up uses supabase.auth.signUp or saves users to our own table, whether we offer Google or magic link sign-in, whether we trim the email and password before signing in, and how the forgot-password flow saves the new password. Then list the fixes in order. Never store passwords in our own tables and don't turn off Row Level Security.

When it's time to get help

Usually it's the wrong project or a Google-only account. Get a second pair of eyes when:

  • Real users are locked out and emailing you.
  • Your app has its own users table and you're not sure how to move to Supabase Auth safely.
  • The forgot-password flow sends emails but nothing changes.
  • You're about to launch and want sign-in and everything else checked.
OptionPriceWhat you get
App Audit$49 one-timeA plain-English written fix list for this error and anything else that breaks, within 3 business days
Payments Live$199 one-timeStripe payments wired into your app and tested with test cards before going live
Launch Pack$499 one-timeAgreed bug fixes, Stripe payments, and your app published on your own domain with HTTPS

We confirm the scope by email before any work starts, and you can ask questions first without paying. Never send anyone your password or your Supabase secret key.

Related guides

Sources

FAQ

What does Invalid login credentials mean in Supabase?

Supabase couldn't match that email and password. It returns the same message when there's no account with that email, when the account has no password (for example it was made with Google or a magic link), and when the password is wrong, so the message alone doesn't tell you which.

Why can't I log in right after signing up?

If email confirmation is on and the password is right, Supabase says Email not confirmed instead. If you see Invalid login credentials, check in Authentication, Users that the account exists in the same Supabase project your app is using.

The user signed up with Google. Why does email and password say Invalid login credentials?

An account created with Google has no password, so a password sign-in for that email fails with Invalid login credentials. Point them to the Continue with Google button.

Is the email case-sensitive?

No. Supabase looks the email up in lowercase, so Name@Example.com and name@example.com are the same account. Spaces before or after the email or password still break it, so trim them.

Some links are referral links; we may earn a commission at no extra cost to you. It never changes our recommendations.

Newsletter

Get the monthly "which AI tool" email

One short, beginner-friendly email a month. No spam.

Form not showing? Subscribe here