You built your app with Lovable, Bolt, Cursor or Replit, with Supabase handling sign-up and login. You can log in fine. But a new user signs up, tries to log in, and gets stuck. The login form shows "Email not confirmed", or "Invalid login credentials", or your app shows nothing at all because it never displays the error.
Your own account usually works because it was confirmed long ago, so you don't see the problem until real users hit it.
The short answer
On hosted Supabase projects, users must confirm their email before they can sign in. Supabase's docs say this is on by default. Until the user clicks the confirmation link, Supabase refuses the login with the error code email_not_confirmed, which it describes as "Signing in is not allowed for this user as the email address is not confirmed."
So the fix is usually not to change the login page. It is to make sure the confirmation email reaches the user, and to give them a clear way forward when it hasn't.
Which error do you have?
Open your live site, try to log in as the stuck user (or a new test user), and look at the response to the login request in your browser's developer tools, under the Network tab. Supabase's docs say errors from its Auth API carry a code you can rely on, and recommend checking error.code rather than matching the message text.
email_not_confirmed: the account exists but the email was never confirmed. Read on.invalid_credentials: Supabase describes this as "Login credentials or grant type not recognized." The email and password don't match an account that can sign in with a password. Check for typos, then ask the user to reset their password.- No error shown at all: your app may be catching the error and doing nothing with it. Ask your AI tool to show the error message on the login form.
Why users end up unconfirmed
- The confirmation email never arrived. Supabase's built-in email service is for trying things out. Its docs say it has a limit of 2 emails per hour, with availability on a best-effort basis, and recommend your own email provider for production. We cover this in Users not getting confirmation emails?.
- The email arrived but the link failed. If users click the link and see "Email link is invalid or has expired", see our guide to that error.
- The user was created by your own code. If your app creates users on the server with Supabase's admin
createUsercall, Supabase's reference shows that you passemail_confirm: trueto auto-confirm the email. Without it, the user can be left unconfirmed and unable to sign in. - The user tried to sign up again. Supabase's docs warn that if an account already exists, sign-up may return a response that hides this. So a second sign-up can look like it worked when nothing changed.
How to fix it
- Get the confirmation email delivering. If you use your own Supabase project, set up your own email provider (custom SMTP) as Supabase recommends for production. On Lovable's built-in backend, check the sending limit under More, Users, Settings, Email, Advanced.
- Let users ask for a new email. Add a "Resend confirmation email" button that appears when login fails with
email_not_confirmed. In supabase-js, that issupabase.auth.resend({ type: 'signup', email }). On Lovable's built-in backend, Lovable's docs say signing in again does not resend the email, but the user can get a new one by signing up again with the same email address. - Unblock a user who is stuck now. On Lovable's built-in backend, Lovable's docs say users added with Add user, Create new user in More, Users are confirmed automatically. With your own Supabase project, server code can confirm a user with
supabase.auth.admin.updateUserById(userId, { email_confirm: true }). Supabase says admin calls must only run on a server: never put yourservice_rolekey in the browser. - Test like a new user. Sign up on the live site with an email address you have never used in the app, confirm it from the real email, then log in. Your old test account will not show this problem.
Should I just turn email confirmation off?
It makes the error go away, but Lovable's docs point out the cost: without confirmation, anyone can sign up with an address they don't own. Lovable suggests auto-confirm for building and testing, and keeping confirmation on for a live app. Fixing email delivery is the better long-term answer.
Paste this into your AI tool
> New users can sign up but can't log in. Please: show the exact Supabase error on the login form; when the error code is email_not_confirmed, show a message telling the user to check their email and a "Resend confirmation email" button that calls supabase.auth.resend({ type: 'signup', email }); check error.code, not the message text. If any server code creates users with auth.admin.createUser, tell me whether it sets email_confirm. Do not turn off email confirmation and do not put the service role key in browser code.
Catch it before your users do
This kind of break is easy to miss because your own login keeps working. Scheduled testing from FlowCanary is launching by 30 November 2026. Once it is live, it will test the flows a new visitor can do in your app, such as sign-up and checkout, in a real browser on a schedule, with logged-in flows on Pro, and tell you in plain English when one breaks, with a fix prompt for Lovable, Bolt, Cursor or Replit. Until then, the free check works today: paste your live URL and it opens the page in a real browser and reports JavaScript errors, failed requests and blank pages.