# Lovable authentication errors: causes and fixes

Source: https://www.plutonapps.com/resources/lovable-authentication-errors

Published 2026-11-23, updated 2026-11-23, sources checked 2026-11-23. By Irfan Habib (https://www.plutonapps.com/authors/irfan-habib).

Most sign-in errors in a Lovable app come from a setting, not from the code: an unconfirmed email, an email limit, an address missing from the redirect list, or an access rule. Here is how to read the error and where to fix it.

As of November 23, 2026, sign-in in a Lovable app runs on Supabase Auth, either through Lovable Cloud or through your own Supabase project. When it fails, the error usually comes from one of five places: email confirmation, sending limits on auth emails, the Site URL and redirect URL list, a sign-in method that is turned off, or access rules that hide data once the user is in.

Supabase's documentation advises identifying an auth error by its error code, not its message, so the code is the thing to find first. This guide lists the common codes, what each means, and where to change the setting behind it.

It is for founders whose Lovable app shows a sign-in, sign-up or password-reset error to real users. Google sign-in has its own guide, [Lovable Google login not working](https://www.plutonapps.com/resources/lovable-google-login-not-working), which covers redirect_uri_mismatch, Google's Testing mode and the supabase.co consent screen. Platform facts come from Supabase's and Lovable's documentation, listed under Sources.

## How do you find the real error?

Find the error code, not the message. Reproduce the failure in a private window with a fresh email address, open the browser's network tab and read the code field in the failed auth response, such as email_not_confirmed. Then read the authentication logs: on Lovable Cloud under More, then Settings, then Logs; on your own Supabase project, in its dashboard.

1. **Reproduce it as a customer** Open the published address in a private window and sign up or sign in with a fresh email address. Write down the exact message and the address in the browser bar.
2. **Read the error code** Open the browser console and the network tab, find the failed auth request and look for the code field in its response, such as email_not_confirmed.
3. **Read the auth logs** On Lovable Cloud, open More, then Settings, then Logs, and choose Authentication logs. On your own Supabase project, open the auth logs in the Supabase dashboard.
4. **Check the auth settings** On Lovable Cloud, open More, then Users, then Settings. On your own Supabase project, open Authentication in the dashboard, including URL Configuration.

## What do the common error codes mean?

Most Lovable sign-in errors carry a Supabase Auth error code that names the cause. email_not_confirmed means the user has not confirmed their email; invalid_credentials means the email and password were not recognised; email_address_not_authorized means the default Supabase email will not send to that address; and the rate-limit codes mean too many emails or requests.

These descriptions follow Supabase's error code reference. The last column says where to look.

| Code | What it means | Where to look |
| --- | --- | --- |
| email_not_confirmed | The user has not confirmed their email yet | Email confirmation setting |
| invalid_credentials | Email and password, or grant type, not recognised | The user's details; whether the account exists |
| email_address_not_authorized | Default Supabase email will not send to this address | Custom SMTP on your Supabase project |
| over_email_send_rate_limit | Too many emails sent to this address | Email rate limits; wait, then retry |
| over_request_rate_limit | Too many requests from one IP address (HTTP 429) | Retries and loops in the app |
| otp_expired | The code or email link has expired | Ask the user to sign in again |
| flow_state_expired | The sign-in flow took too long and expired | Ask the user to sign in again |
| signup_disabled | New sign-ups are turned off | The sign-up setting |
| email_provider_disabled | Email and password sign-up is turned off | The email provider setting |
| provider_disabled | That OAuth provider is turned off | The provider's settings |
| weak_password | The password fails the strength rules | Password rules; show them on the form |
| user_already_exists | An account with that email or phone exists | Offer sign-in or password reset |
| refresh_token_not_found | The session behind the refresh token is gone | Ask the user to sign in again |
| session_expired | The session has expired | Session settings; sign in again |

## Why do confirmation and password-reset emails never arrive?

Usually a sending limit, not a bug. The limits differ by backend.

- Lovable Cloud: auth emails go out from Lovable's shared sender by default, which has a strict limit. Lovable's docs say new projects start at 1,000 emails per hour once email sending is active, adjustable under More, then Users, then Settings, Email, Advanced. To send from your own domain, set up custom emails.
- Your own Supabase project: the built-in email service only delivers to members of the project's team and fails for other addresses with Email address not authorized. Supabase lists its rate limit as 2 messages per hour, with no delivery guarantee, and urges custom SMTP for everything beyond testing.
- Either way, ask users to check spam. If many people signed up at once, you may have hit the hourly limit.

Our guides to [emails going to spam](https://www.plutonapps.com/resources/lovable-emails-going-to-spam) and [sending email with Resend](https://www.plutonapps.com/resources/lovable-resend-email) cover delivery and a custom sender in detail.

## Why does a new user get email_not_confirmed?

With email confirmation on, Supabase does not let a user sign in until they click the link in the confirmation email. That is the right setting for a live app; Lovable's docs recommend keeping confirmation on and using auto-confirm only for testing. If the email never came, fix sending first.

Lovable's docs note that signing in again does not resend the confirmation email. The user can sign up again with the same address, or on Lovable Cloud you can create the account under More, then Users, Add user, Create new user, which confirms it automatically.

## Why does the email link open localhost or the wrong site?

Because of the Site URL. Supabase uses it as the default redirect when the code does not name one, and on a new Supabase project it is http://localhost:3000. If a confirmation or reset link sends users to localhost, change the Site URL to your live address in URL Configuration.

- A redirect address the code passes in must match an entry on the Redirect URLs list.
- If your email templates should follow that redirect, Supabase says to swap the SiteURL variable in the confirmation link for the RedirectTo variable.
- On Lovable Cloud, Lovable sets the Site URL to your published address when you publish, unless it is already on your own domain, and adds connected custom domains to the redirect list. On your own Supabase project, the Site URL is yours to set.

## Why does sign-in work in the preview but not on the published site?

Lovable's docs give the usual cause: the published address or custom domain is missing from the project's redirect URLs. Add it under More, then Users, then Settings, Advanced, Redirect URLs, or ask Lovable in the chat to add it. End each address with /** to match every path, and use a domain you own; Lovable removes other lovable.app addresses whenever it updates the list.

## Why is the app empty or erroring right after login?

Sign-in worked; the data rules did not. Lovable's docs put it plainly: sign-in identifies a person but does not limit what they can see. That job belongs to [row-level security](https://www.plutonapps.com/resources/what-is-row-level-security), and its mistakes look like auth errors.

- Empty lists after login: with row-level security on and no policy for that table, Supabase returns no data. Add a policy that lets each user read their own rows.
- Error 42501: a permission is missing, or an insert or update fails a policy's check. Read the policy for that table.
- Error 42P17, infinite recursion: the policies on two tables read each other. Supabase's fix is a security definer function, kept out of any schema the API exposes.
- A policy that compares auth.uid() quietly fails when no user is signed in, because auth.uid() is then null. Write policies for the authenticated role.

Never fix an empty list by allowing every row; that is how users end up seeing each other's data. Our [RLS policy examples](https://www.plutonapps.com/resources/supabase-rls-policy-examples), [authentication and user roles](https://www.plutonapps.com/resources/lovable-authentication-user-roles) and [users seeing each other's data](https://www.plutonapps.com/resources/lovable-users-see-each-others-data) show the safe patterns.

## Why are users suddenly signed out?

Codes such as refresh_token_not_found, session_not_found and session_expired mean the session behind the request no longer exists or has expired, and the fix for the user is to sign in again. If it happens to everyone at once, look for a cause on your side: after moving to a new Supabase project, Lovable's docs say passwords carry over but sessions do not, so every user has to sign in again once.

> **Prompt to paste into Lovable** Sign-in on my published app fails with the error code [code] for [what the user does]. Show the user a clear message for each Supabase auth error code instead of a generic error, and log the code. Do not change any row-level security policy to allow all rows, and do not turn off email confirmation. Explain the cause before changing anything, then list every file you changed.

## When should you stop prompting and get help?

Most settings fixes take minutes once you know the code. Get an engineer when:

- Paying customers cannot sign in right now.
- Fixing an empty page after login would mean loosening access rules you do not fully understand.
- Users can see data that is not theirs, or you are not sure they cannot.
- You moved backends or domains and existing users cannot get back in.
- The same sign-in fix has failed three times.

Our [Lovable security checklist](https://www.plutonapps.com/guides/lovable-security-checklist) covers sign-in, roles and access rules before launch. If you would rather hire one person, our guide to [hiring a Lovable developer](https://www.plutonapps.com/guides/hire-a-lovable-developer) compares freelancers, agencies and subscriptions on cost and scope. Our [vibe-coding rescue service](https://www.plutonapps.com/services/vibe-coding-rescue) starts with an architecture review of what exists, then fixes what is risky, such as access rules, secrets and payments. Ongoing plans are on our [pricing page](https://www.plutonapps.com/pricing).

## Sources

All checked on November 23, 2026. We review this page every 30 days.

- Supabase docs: Error codes, on each auth error code, identifying errors by code and HTTP status 429 ([supabase.com/docs/guides/auth/debugging/error-codes](https://supabase.com/docs/guides/auth/debugging/error-codes)).
- Supabase docs: Redirect URLs, on the Site URL, its localhost default, the Redirect URLs list, wildcards and the RedirectTo email template variable ([supabase.com/docs/guides/auth/redirect-urls](https://supabase.com/docs/guides/auth/redirect-urls)).
- Supabase docs: Send emails with custom SMTP, on the default service's team-only delivery, rate limit and lack of guarantee ([supabase.com/docs/guides/auth/auth-smtp](https://supabase.com/docs/guides/auth/auth-smtp)).
- Supabase docs: General configuration, on confirm email and allowing new sign-ups ([supabase.com/docs/guides/auth/general-configuration](https://supabase.com/docs/guides/auth/general-configuration)).
- Supabase docs: Row Level Security, on tables without policies, auth.uid() returning null, the authenticated role and errors 42501 and 42P17 ([supabase.com/docs/guides/database/postgres/row-level-security](https://supabase.com/docs/guides/database/postgres/row-level-security)).
- Lovable docs: Users and authentication, on auth settings, Site URL and redirect URLs on the built-in backend and on your own Supabase ([docs.lovable.dev/features/authentication](https://docs.lovable.dev/features/authentication)).
- Lovable docs: Email authentication, on confirmation, the shared sender, email rate limits and unconfirmed users ([docs.lovable.dev/features/email-auth](https://docs.lovable.dev/features/email-auth)).
- Lovable docs: Logs, on authentication logs ([docs.lovable.dev/features/logs](https://docs.lovable.dev/features/logs)).
- Lovable docs: Deploying and hosting outside Lovable, on password hashes carrying over and sessions not carrying over ([docs.lovable.dev/tips-tricks/external-deployment-hosting](https://docs.lovable.dev/tips-tricks/external-deployment-hosting)).

## Frequently asked questions

### Why does my Lovable app say email not confirmed?

Email confirmation is on, and the user has not clicked the link in their confirmation email yet. Keep confirmation on for a live app. If the email never arrived, fix sending first. Signing in again does not resend it, so the user can sign up again, or on Lovable Cloud you can add the user yourself.

### Why are sign-up emails not arriving from my Lovable app?

Usually a sending limit. On your own Supabase project, the default email service only sends to team members and is limited to 2 messages per hour, so you need custom SMTP. On Lovable Cloud, auth emails use a shared sender with a strict limit unless you set up custom emails.

### Why do confirmation links open localhost?

The Site URL is still Supabase's default, http://localhost:3000, which is used whenever the code does not name a redirect. Set it to your live address in URL Configuration and add every live address to the Redirect URLs list.

### Why does login work but the app shows no data?

Row-level security is on and no policy lets the signed-in user read those rows, so Supabase returns nothing. Add a policy for the authenticated role that matches each row to its owner. Never fix it by allowing all rows.

### Where can I see auth errors in Lovable Cloud?

Open More, then Settings, then Logs, and choose Authentication logs from the log type selector. Sign-in settings are under More, then Users, then Settings.
