Skip to content

Supabase Auth errorSupabase: “User already registered”

Some people who sign up get User already registered, error code user_already_exists. Others with an existing account get no error at all, but never receive an email or get in. Both come from the same rule: whether Supabase tells your app that an email is taken depends on the project’s Confirm Email setting. Here’s how each case works, in Supabase’s words, or hand it over at a fixed price.

Short answer

With Confirm Email off, signUp() with an email that already has an account returns User already registered. With it on, which is the default on hosted projects, Supabase hides that the account exists and returns what looks like a new user, with an empty identities list. Handle both: tell people to sign in or reset their password, without saying whether the email has an account.

Why it happens, and what to show people

  1. 01

    Confirm Email is off, so Supabase says the email is taken

    “User with this information (email address, phone number) cannot be created again as it already exists.” Supabase, Auth error codes

    Supabase Auth’s open-source code returns this error only when the project confirms emails automatically. Then a second sign-up with the same email gets this error straight away. Catch error.code user_already_exists and send people to sign-in or password reset.

  2. 02

    Confirm Email is on, so there is no error

    “Be aware that if a user account exists in the system you may get back an error message that attempts to hide this information from the user.” Supabase, signUp

    With confirmations on, Supabase doesn’t reveal that the account exists, so people can’t use your sign-up form to find out who has an account. For an account that is already confirmed, signUp() succeeds, but the returned user has an empty identities list and nothing else happens.

  3. 03

    Your app treats every sign-up as new

    If the app saves the returned user ID or creates a profile row from it, the hidden case gives it an ID that matches no real user. Create profiles in a trigger on auth.users, or after the user confirms, not from the sign-up response.

  4. 04

    Dev and production behave differently

    “On hosted Supabase projects, this is true by default. On self-hosted projects or in local development, this is false by default.” Supabase, Password-based Auth

    The error can show up locally and not on the hosted project, because the Confirm Email default differs. Our Email not confirmed page covers that setting.

Checked against the vendor’s docs on : Supabase docs: Auth error codes; Supabase reference: signUp; Supabase docs: Password-based Auth.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Supabase Email not confirmed · Supabase Invalid login credentials · Supabase Database error saving new user · Supabase Signups not allowed for this instance

Questions

More on this error

Should the sign-up form say the email is already registered?

Saying so lets anyone check who has an account. A safer message is the same for everyone: check your inbox, or sign in or reset your password if you already have an account.

Why did the user get no confirmation email?

If the email already has a confirmed account, the hidden response doesn’t send a new confirmation. The person should sign in or reset their password instead.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; we reply by email, usually within one business day.