← All guides

Lovable Authentication Errors: What Each Message Means and How to Fix It

LovableSupabase

A user writes in: “I can’t log in.” Your Lovable app shows a red toast, a blank page, or nothing at all. “Authentication error” covers a dozen different failures, and each one has its own cause. Guessing between them wastes prompts.

This page works as an index. Find the exact message first, then jump to its section: what it means, the likely cause in an app built with Lovable, and one fix. It covers both Lovable’s built-in backend and a Supabase project you connect yourself, since Supabase Auth sits underneath either way. Tool pages: /fix/lovable and /fix/supabase. If your only symptom is a login that lands on localhost, go straight to Supabase auth redirecting to localhost.

First: is it Lovable, or your app?

Before you touch any code, rule out an outage. Open Lovable’s status page. If your app is connected to a Supabase project of your own, check Supabase’s status page too.

Outages can hit your users’ sign-in, not just the editor. On 17 November 2026 (UTC), Lovable posted an incident titled “Apple auth issues”: Sign in with Apple was failing or slow for a portion of users, and that covered both logging in to Lovable and logging in to apps made with it. It was marked resolved roughly four hours after the first update (Lovable status: Apple auth issues).

Then narrow it down yourself:

Lovable Cloud or your own Supabase project?

Where you look depends on your app’s backend. Lovable’s documentation now uses the name “built-in backend” for what parts of the product still call Cloud (Lovable: Built-in backend). Under the hood it is built on Supabase, so the error codes below are the same for both setups. What changes is where you find the settings and the logs.

Built-in backend (Lovable Cloud)Your own Supabase project
Users list and sign-in methodsMore → Users, then SettingsSupabase dashboard, Authentication
Site URL and redirect allow listMore → Users → Settings → AdvancedAuthentication → URL Configuration
Auth logsMore → Settings → Logs, log type Authentication logsLogs, log type Auth
Who updates redirect URLsLovable, when you publish or add a custom domainYou (Lovable adds only its own addresses)

Lovable’s authentication docs describe the built-in paths and say that on a connected Supabase project, Lovable only adds its own addresses: the Site URL and every other address are your job (Lovable: Users and authentication). Lovable’s Supabase page adds that auth settings for a connected project live in Supabase, not in Lovable (Lovable: Connect to Supabase). The log locations come from Lovable: Logs and Supabase: Logs.

Find the exact message

An app built by AI may catch the error and show “Something went wrong”. The real reason is still in the response from Supabase Auth.

In the browser. Open your published app, open the browser’s developer tools, select the Network tab and type auth/v1 in the filter box. Then try to sign in. The supabase-js client sends its auth calls to paths under /auth/v1/: a password sign-in is a POST to token?grant_type=password, a session refresh is token?grant_type=refresh_token, and a user lookup is a request to user (supabase-js source). Click the failed request and read its response. You want two things: the HTTP status and the code field.

Supabase’s docs advise matching on the code property rather than on the message text, and they list what each code means (Supabase: Auth error codes).

In the logs. On the built-in backend, open the Authentication logs, pick a time range around the failed attempt and filter by status to show errors. On your own Supabase project, open Logs, select the Auth log type and set the level to error. Supabase’s log viewer also has a User filter that matches a user’s ID, which is handy when one customer reports the problem.

Here is the map from message to section:

Message the user or the Network tab showscodeStatusSection
Invalid login credentialsinvalid_credentials400Invalid login credentials
Email not confirmedemail_not_confirmed400Email not confirmed
Auth session missing!no coden/aAuth session missing
Invalid Refresh Token: Refresh Token Not Foundrefresh_token_not_found400Users suddenly logged out
email rate limit exceeded, or any other 429over_email_send_rate_limit, over_request_rate_limit429Rate limits
Database error saving new userunexpected_failure500Sign-up fails with a database error
TypeError: Failed to fetch (Safari: Load failed)no coden/aFailed to fetch: the request got no answer

“Invalid login credentials”

What it means. The sign-in request reached Supabase Auth and was refused with the invalid_credentials code. Supabase’s server code returns this same message in several situations: no user has that email address, the password is wrong, or the account has no password at all (Supabase Auth source: token.go). The response doesn’t tell you which one applies.

Likely causes in a Lovable app:

  • The user signed up with Google or Apple. Supabase stores every sign-in method as its own identity attached to the user (Supabase: Identities). Someone who only ever clicked “Sign in with Google” has no password identity, so typing a password into the email form fails with this exact message.
  • The user came over from another tool. When you import a project and its users into Lovable, the users keep their profiles but not their passwords. They verify their email and pick a new password on their next sign-in (Lovable: Users and authentication).
  • The email in the request isn’t the one they think. Check the request payload in the Network tab. A different address, or a stray space the form didn’t trim, will look like “no such user”.
  • The password really is wrong.

Fix. Look the user up. On the built-in backend, open More → Users and click the user: the details show which login methods they use. On your own project, check Authentication → Users in Supabase. No user with that email means they never signed up, or signed up with a different address. A user with only a Google or Apple identity should use that button. Otherwise, send them through your password reset flow.

“Email not confirmed”

What it means. Code email_not_confirmed: the account exists, but its email address hasn’t been confirmed, so sign-in is blocked (Supabase: Auth error codes). One useful detail from Supabase’s server code: this check runs after the password check. If a user sees “Email not confirmed”, their password was correct (Supabase Auth source: token.go).

Email confirmation is on by default for hosted Supabase projects (Supabase: Password-based auth). On the built-in backend, users get a confirmation email unless Auto-confirm email is turned on (Lovable: Email authentication).

Likely causes: the confirmation email went to spam, never arrived, expired, or the user simply hasn’t clicked it yet.

Fix:

  1. Ask the user to search their inbox and spam folder for the confirmation email, then open the newest link.
  2. Get them a fresh email. On the built-in backend, a fresh sign-in attempt won’t trigger a new confirmation email. Lovable’s docs say the user has to repeat sign-up using the address they registered with (Lovable: Email authentication). On a Supabase project you own, your app can call supabase.auth.resend({ type: 'signup', email }) (Supabase: resend). Ask Lovable to add a “Resend confirmation email” button next to the error.
  3. If no email arrives at all, for anyone, the problem is sending, not confirmation. Work through Supabase confirmation email not sending.
  4. If the email arrives but its link opens localhost or an error page, see the redirect section.

For a single stuck user, the built-in backend gives you another option: add them from More → Users using Add user, then Create new user. Accounts made that way skip confirmation.

“Auth session missing!”

What it means. This one never comes from the server. It is a client-side error class in supabase-js (AuthSessionMissingError) with the message Auth session missing! (supabase-js source: errors.ts). The client raises it when your code asks for something that needs a signed-in user, such as getUser() or updateUser(), while the browser holds no session (supabase-js source).

Where it shows up:

  • The “set a new password” page. The page calls updateUser({ password }), but the session from the reset link was never created. The link may have pointed at a URL that isn’t on your redirect list, been opened in a different browser, or expired. Supabase reset password not working covers each of these and how to fix the page.
  • A page that loads before sign-in finishes, for example a callback or dashboard page that calls getUser() straight away.
  • A logged-out visitor on a page that assumes a user. Here the error is expected. The bug is that the app crashes instead of sending the visitor to the login page.

Fix. Find the page that throws it (the Network tab shows no auth/v1 request for it, because the client gave up before sending one). If it’s the reset page, request a fresh reset email and open it in the same browser. Then check that the link’s destination is allowed under your redirect URLs. If it’s a page that should handle signed-out visitors, ask Lovable to treat a missing session as “signed out” and redirect to login.

Users suddenly logged out, or “Invalid Refresh Token”

What it means. A Supabase session is a short-lived access token plus a refresh token. A refresh token can be exchanged only once for a new pair, and supabase-js does that exchange for you in the background (Supabase: User sessions). refresh_token_not_found means the session behind the refresh token no longer exists, and session_not_found means the same for the session itself (Supabase: Auth error codes).

Likely causes: the user signed out (possibly on another tab), changed their password, or was deleted. On your own Supabase project, session settings such as time-boxed sessions, an inactivity timeout, or single session per user also end sessions (Supabase: User sessions). The built-in backend has no settings for session length or inactivity at all (Lovable: Users and authentication).

Fix. When a refresh fails, the app should clear the stored session and show the login page. It shouldn’t loop or show a raw error. If users are logged out far more than expected on your own Supabase project, check the Sessions settings in Supabase Auth.

Google or Apple sign-in fails

The fix depends on who owns the OAuth credentials.

Built-in backend, Managed by Lovable (the default). Lovable runs the Google and Apple OAuth setup, so you don’t configure anything in Google Cloud or the Apple Developer portal (Lovable: Google authentication). If it breaks, check the status page first, then confirm the method is enabled under More → Users → Settings.

Built-in backend, your own Google credentials. The errors Lovable documents for this setup (Lovable: Google authentication):

  • Redirect URI mismatch: each redirect URI you select in Lovable must be listed exactly, character for character (scheme and trailing slash included), in the Authorized redirect URIs list of the OAuth client in Google Cloud. After you add a custom domain, Lovable lists its redirect URI but leaves it unselected. Add it in Google Cloud first, then select it.
  • Blocked at the consent screen: if your Google Cloud app isn’t published, add your account as a test user.
  • Wrong client type: Lovable’s redirect flow needs a Web application client. Mobile and desktop client types won’t work.

Built-in backend, your own Apple credentials. Apple client secrets are JWTs that last at most six months. Lovable’s docs name an expired secret as the top reason Apple sign-in stops after months of working. Use Generate secret in the Apple settings, with your .p8 key, to make a new one (Lovable: Apple authentication). Also, switching between managed and your own Apple credentials can leave existing Apple users unrecognized, so plan that change early.

Your own Supabase project. Managed by Lovable isn’t available here. Enable the provider in Supabase’s Authentication settings and enter your own OAuth credentials (Lovable: Connect to Supabase). In Google Cloud, the Authorized redirect URI must be your Supabase project’s callback URL (it ends in /auth/v1/callback), and the Authorized JavaScript origins should be your app’s addresses (Supabase: Login with Google).

Inside Instagram, TikTok or another in-app browser: Google returns 403: disallowed_useragent. That has nothing to do with your settings; see Google sign-in 403 disallowed_useragent.

Login works, but the user sees no data or can’t save

This is not an auth error, but it gets reported as one. The user is signed in and the dashboard is empty, or saving fails.

Lovable’s docs put it plainly: signing in identifies a person, while row level security (RLS) policies decide which records that person can read or change (Lovable: Users and authentication). Supabase separates two failures here. A missing table grant produces a permission error. A policy that lets no row through produces no error at all, just an empty list (Supabase: API keys).

Sent to localhost, or looping after login

If sign-in, a confirmation link or a reset link lands on localhost, or works in preview but not on your published site or custom domain, the Site URL and redirect URLs are the place to look. Lovable’s docs give this exact symptom (fine in preview, broken once published) and point to the redirect URL list (Lovable: Users and authentication).

Two Lovable-specific details:

  • Publishing, or connecting a custom domain, makes Lovable refresh these URLs for apps on its built-in backend. On a Supabase project you own, the Site URL is yours to change.
  • Lovable’s redirect list rejects localhost addresses. To test a local copy, open it at http://127.0.0.1:<port> and add that address with /** on the end.

The full walkthrough is in Supabase auth redirecting to localhost, and item 3 of Lovable app not working covers the login loop.

Rate limit errors (429)

A 429 Too Many Requests from auth/v1 means Supabase Auth has rate-limited the request (Supabase: Rate limits). The code tells you which limit:

  • over_email_send_rate_limit: that address has received its share of auth emails for now. The user has to wait before asking for another one.
  • over_request_rate_limit: one IP address sent more auth requests than the limit allows. Supabase’s error-code docs note this can come from a bug that fires repeated requests, such as a React useEffect that calls sign-in or refresh on every render (Supabase: Auth error codes). If one user hits it on a normal visit, look for that loop in the Network tab: the same auth/v1 call repeating.

Where to change limits: on your own Supabase project, under Authentication → Rate Limits. On the built-in backend, the only auth rate limit you can change yourself is Rate limit for sending emails (under More → Users → Settings → Email → Advanced). For the others, Lovable asks you to contact support (Lovable: Email authentication). Check the current values in those settings rather than trusting a number from a blog post.

Sign-up fails with “Database error saving new user”

A 500 from the sign-up request with this message, and the unexpected_failure code, means Supabase Auth couldn’t write the new user row (Supabase Auth source: signup.go). Supabase’s docs say a 500 from Auth points at your database setup in most cases, for example a misbehaving trigger (Supabase: Auth error codes).

If your app uses a database trigger to create a profile row whenever someone signs up, that trigger runs as part of the same write. A renamed column, a new required field or a policy change can break it. Open the Postgres logs (on the built-in backend, the PostgreSQL logs type) at the time of the failed sign-up and read the underlying error.

What not to do

A prompt to give Lovable once you know the message

Once you have the code from the Network tab or the logs, give Lovable the message, the page, the user’s sign-in method and the result you expect. Lovable’s docs recommend pasting the exact error, especially when it happens on the published site rather than in preview (Lovable: Debug and improve your app). For example:

On the published site (https://yourapp.com/login), signing in with email and
password fails for users who originally signed up with Google. Supabase returns
400 with code "invalid_credentials". Expected: the login page detects this case
and tells the user to use "Continue with Google". Do not change auth settings,
RLS policies or API keys. Explain the change before making it.

Use Plan mode first if the same error has survived one fix already.

FAQ

Why does login work in the Lovable preview but not on my published site?

The project’s redirect URLs don’t include the published address or your custom domain. Apps on Lovable’s built-in backend get them added automatically each time you publish or connect a domain. On a Supabase project you own, add them under Authentication → URL Configuration. With your own Google credentials, register the domain’s redirect URI in Google Cloud as well.

Why does a user who signed up with Google get “Invalid login credentials” with a password?

Their account has a Google identity but no password. Supabase Auth refuses password sign-in for an account without a password and returns the same message it uses for a wrong password. They should sign in with Google.

Is it safe to turn off “Confirm email” so users can log in?

Not for a live app. With confirmation off, Supabase treats every new address as confirmed, so a stranger can register with an address that belongs to someone else. Fix the email delivery instead, and keep confirmation on.

Where do I see auth errors if I’m on Lovable Cloud?

Open More → Settings → Logs and choose Authentication logs. Pick a time range around the failed attempt and filter by status to see errors. The logs don’t stream live, so click Refresh after reproducing the problem.

How do I tell a Lovable outage from a bug in my app?

Check status.lovable.dev and, for a Supabase project you own, status.supabase.com. If both pages are clear, only some users or one method fail, and the Network tab shows a specific code, look at your app and its settings.

Comments

Add a comment

Generated for you. Click to type your own.

Required. Never shown on the page. Privacy policy.

Basic markdown: **bold**, *italic*, `code`, lists, quotes, and fenced code blocks. HTML shows as plain text.

Your draft stays on this device until you post.