Login says "Email not confirmed"? Fix it
Someone signs up on your site. The form says thanks, maybe it even tells them to check their inbox. Then they try to log in and get a short, unhelpful error: Email not confirmed. Most people do not email you about it. They just leave.
This one catches a lot of sites built with Lovable, Bolt, Replit, v0 and Cursor, because most of them use Supabase for accounts.
The symptom
- Sign-up appears to work, and a new row shows up under Authentication, Users in Supabase.
- Logging in with the right email and password returns "Email not confirmed" (the error code is
email_not_confirmed). - It works for you, because your own account was confirmed long ago.
The cause
On hosted Supabase projects, the Confirm email setting for the email provider is on by default. With it on, a new account cannot sign in with a password until the person clicks the link in the confirmation email. Until then, signUp returns a user but no session, and signInWithPassword refuses with "Email not confirmed".
The default is sensible. The trouble is everything around it:
- The email never arrives. Supabase's built-in email sender is meant for testing. It is heavily rate limited and, on current hosted projects, only delivers to addresses on your project team. Real visitors get nothing.
- The link points to the wrong place. The confirmation link redirects to your Site URL. If that is still
http://localhost:3000or an old preview address, the click lands on a dead page. - The redirect is not allowed. If your code passes
emailRedirectTowith a URL that is not in the Redirect URLs list, Supabase falls back to the Site URL instead. - The sign-up screen hides it. Generated forms often show "Welcome!" without saying an email is waiting.
- The link was already used. Some work email scanners open links first, using up the one-time token, so the person sees an expired-link error.
Step-by-step diagnosis
- In the Supabase dashboard, open Authentication and find the email provider settings. Note whether Confirm email is on.
- Open Authentication, Users and find a stuck person. If their email is not marked as confirmed, that is your answer for that account.
- Sign up on the live site with a fresh address you control that is not on your Supabase team. See whether the email arrives. Check spam.
- If it arrives, hover the link before clicking. Check that it ends up on your real domain, not localhost or a preview URL.
- Open Authentication, URL Configuration. Check that Site URL is your live domain and that every domain you use (live, www, custom domain) is listed under Redirect URLs.
- Check the Auth logs for rate limit and send errors.
Fixes per builder and host
Any Supabase project
- Set up custom SMTP (Authentication, Emails, SMTP settings) with a real email provider sending from your own domain with SPF and DKIM. This matters most.
- Set Site URL to your live domain and add every live domain to Redirect URLs.
- Add a "Resend confirmation email" button next to the login error. In code that is
supabase.auth.resend({ type: 'signup', email }). - For people already stuck, an admin can confirm them on the server with
auth.admin.updateUserById(id, { email_confirm: true })using the service role key. Never put that key in the browser.
Lovable and Bolt
Ask the builder to show a clear "check your inbox" screen after sign-up, handle the email_not_confirmed error with a friendly message and a resend button, and pass your live domain as emailRedirectTo. Then fix Site URL, Redirect URLs and SMTP yourself in Supabase, since those live in the dashboard, not your code.
v0 and Cursor projects on Vercel or Netlify
Preview deployments get their own addresses. Add a wildcard for your preview domain to Redirect URLs, keep Site URL on production, and build emailRedirectTo from an environment variable instead of hard-coding localhost.
Replit
With Supabase on a Replit deployment, set Site URL to the deployment or custom domain, not the workspace preview URL.
Turning Confirm email off hides the error but lets anyone sign up with an address they do not own.
How to verify
- Sign up on the live site with a brand new outside address. The email should arrive within a minute or two.
- Click the link. You should land on your live domain, signed in or on a clear "confirmed" page.
- Log in with that account in a private window. No error.
- Log in before confirming. You should see your friendly message and a resend button.
More detail lives in our guides on Supabase auth broken after deploy, invalid login credentials, and sign-up emails not arriving.
Prevention
- Set up custom SMTP before launch, not after the first complaint.
- Every time you change domains, update Site URL and Redirect URLs the same day.
- Test sign-up with a fresh outside address after each release, not with your own old account.
- Watch the live site from outside, so a broken sign-up or login gets noticed before visitors give up on it.
Test your login as a stranger would.
