App Finishers

Fix guide · updated 2026-11-15

Supabase "Email not confirmed" error

AuthApiError: Email not confirmed · email_not_confirmed · Email address not authorized · email rate limit exceeded

Someone signs up for your app, tries to log in, and gets "Email not confirmed". Or since you went live, every new user hits it. Their password is fine. What's missing is one date on their account: the moment they confirmed their email address. Here's how Supabase decides, and the fix for each way it goes wrong.

What the error means

We read the sign-in code in Supabase Auth, the server behind supabase.auth (internal/api/token.go). For an email and a password, it checks the password first. A wrong password gets "Invalid login credentials", even on an account that was never confirmed. Only when the password is right does it look at the account's email_confirmed_at. If that's empty, the answer is HTTP 400 with the code email_not_confirmed and the message "Email not confirmed".

So the error tells you two things: the person typed the right password, and their address was never confirmed. Either they haven't clicked the link yet, the link never reached them, or you changed a setting and expected it to fix accounts that already exist. Six cases cover it.

1. They haven't clicked the link yet

On hosted Supabase projects, users must confirm their email before they can sign in. That's the default, and you change it on the Auth Providers page of your dashboard, under Email. With it on, signUp() creates the account unconfirmed, sends the confirmation email, and returns no session. That part works as designed. The bug is a login form that shows the raw error and leaves the user stuck. Catch the code, say what to do, and offer a new link:

const { error } = await supabase.auth.signInWithPassword({ email, password });
if (error?.code === 'email_not_confirmed') {
  // Say: "Check your inbox for the confirmation link", with a "Send it again" button
}

// The "Send it again" button:
const { error: resendError } = await supabase.auth.resend({
  type: 'signup',
  email,
  options: { emailRedirectTo: 'https://yourapp.com/welcome' },
});

For an address that is already confirmed, resend answers OK and sends nothing (we checked internal/api/resend.go), so the button is safe to show.

2. The email never left Supabase

This is the usual cause once real people sign up. Until you set up your own email sending (custom SMTP), Supabase's built-in service only delivers to the members of your Supabase organization. Every other address fails with "Email address not authorized". It also sends only 2 emails an hour for the whole project (Supabase's docs, today's value; they say it can change). You test with your own address, it works, you launch, and nobody else ever gets a link. They can't confirm, so they can't log in.

The fix is custom SMTP: an email service such as Resend, Postmark, Brevo or Amazon SES, entered on your project's SMTP settings page (Authentication). After that, Supabase sends to every address, starting at 30 emails an hour, which you can raise under Authentication → Rate Limits. Our guide on "Error sending confirmation email" walks through the setup and its usual traps, and if you picked Resend, read "You can only send testing emails to your own email address" first.

3. Too many emails, too fast

Two limits stop new confirmation emails, and both answer HTTP 429 with the code over_email_send_rate_limit:

Signing up again with the same unconfirmed address doesn't fail with an error about the account. Supabase leaves the account as it is and sends the confirmation again, which counts against the hourly limit (within 60 seconds of the last one, it answers "For security purposes…" instead). A user who signs up again every few minutes because the email hasn't come, or a test script, can use up the hour for everybody. Show the "Send it again" button with a short countdown, and set up custom SMTP before launch.

4. They clicked, landed on a broken page, and gave up

Supabase confirms the address the moment the link is opened, before it sends the browser anywhere (internal/api/verify.go). If your Site URL is still http://localhost:3000, or the address you passed as emailRedirectTo isn't in your allowed list, the user lands on a dead page. Their account is confirmed all the same, and they can log in. They just don't know it.

Set your real address as the Site URL and add every address your app redirects to under Authentication → URL Configuration, then pass that address as emailRedirectTo in signUp(). The full walkthrough is in Supabase login redirects to localhost.

5. You turned off "Confirm email" and old users are still stuck

Turning the setting off only changes sign-ups from then on: a new account is confirmed as it's created. Accounts made before the change keep an empty email_confirmed_at, and the sign-in check from the top of this page still applies to them, so they keep getting "Email not confirmed". We checked both sides in Supabase Auth's code (signup.go and token.go).

Confirm those accounts from a server, with the admin API and your service role key. Never put that key in browser code:

// Server only: an Edge Function, an API route or a one-off script
import { createClient } from '@supabase/supabase-js';

const admin = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_SERVICE_ROLE_KEY);
const { error } = await admin.auth.admin.updateUserById(userId, { email_confirm: true });

This runs on your server or in an Edge Function, never in the browser: there, every auth.admin call fails with "User not allowed".

Only do this for addresses you trust: confirming skips the proof that the person owns the inbox. If your app should stay open to the public, keep "Confirm email" on and fix the email delivery instead (case 2).

6. Something opened the link before the user did

Some company mail filters open every link in a message to scan it. The confirmation link works once, so the scanner uses it up: the account is usually confirmed by that visit, and the user's own click then shows "Email link is invalid or has expired". Tell them to just try logging in. If it keeps happening, our guide on "Email link is invalid or has expired" shows how to switch to a code the user types instead of a link.

If an AI tool built your app

Apps built with Lovable, Bolt or Replit on Supabase often ship with all of this at once: the built-in email service, the Site URL still on the preview or localhost, and a login form that prints the raw error. Before launch, give your AI tool this prompt:

On the login form, handle the Supabase error code email_not_confirmed: show "Check your inbox for the confirmation link" and a "Send it again" button that calls supabase.auth.resend({ type: 'signup', email, options: { emailRedirectTo: window.location.origin } }), with a 60-second countdown after each send. Show the 429 messages in plain words instead of the raw error. Pass emailRedirectTo in signUp too. Don't change anything else.

Then do the two dashboard steps yourself, since the AI can't: custom SMTP (case 2) and URL Configuration (case 4).

Not quite your error?

Still stuck?

Look at the account itself in the SQL editor of your Supabase dashboard:

select email, email_confirmed_at, confirmation_sent_at
from auth.users
where email = 'person@example.com';

An empty email_confirmed_at means the address was never confirmed, and confirmation_sent_at says when Supabase last tried to send the link. Then open the Auth logs at that time: a send that failed is there with its reason, such as "Email address not authorized" or a rate limit, and so is the click on the link if it ever reached Supabase.

Other Supabase problems? See Supabase fixes.