Skip to content

Supabase Auth errorSupabase Auth: identity_already_exists

identity_already_exists is the Supabase Auth error for linking an OAuth identity that is already linked to a user. It shows up when a signed-in user calls linkIdentity with a Google or GitHub account that another user, or the same one, already has.

Short answer

Read the error on the redirect back to the app and tell the user that account is already in use. Offer to sign in with it instead. If the user owns both accounts, sign in to the other one, unlink the identity there, then link it again. Copy over any data you need first.

Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

Why the identity can’t be linked, and the fix

  1. 01

    The OAuth account already belongs to another user

    “The identity to which the API relates is already linked to a user.” Supabase docs, Auth error codes (identity_already_exists)

    The user signed up earlier with that Google account, then signed up again with email. Linking can’t move an identity between users; sign in with it, or unlink it from the old user first.

    const { data, error } = await supabase.auth.linkIdentity({ provider: 'google' });
    // After the redirect, look for error_code=identity_already_exists in the URL query string or hash
    // and offer: 'This Google account already has an account. Sign in with it?'
  2. 02

    The identity was already linked automatically

    “Supabase Auth automatically links identities with the same email address to a single user.” Supabase docs, Identity linking (Automatic linking)

    Supabase links OAuth identities with the same email to one user. A user who signed in with Google using the same email may already have it. Check getUserIdentities before showing a link button.

  3. 03

    Unlinking fails on the other account

    “The user needs to be signed in and have at least 2 linked identities in order to unlink an existing identity.” Supabase docs, Identity linking (Unlink an identity)

    An account with only one identity can’t drop it, or the user would be locked out. Add an email and password or another provider to that account first, then unlink.

  4. 04

    Manual linking is off

    “Calling the supabase.auth.linkUser() and related APIs is not enabled on the Auth server.” Supabase docs, Auth error codes (manual_linking_disabled)

    Also check: linkIdentity needs manual linking turned on. With it off, the error is manual_linking_disabled rather than this one.

Checked against the vendor’s docs on : Supabase docs: Auth error codes; Supabase docs: Identity linking.

Rather hand it over?

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

“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
A buyer in the United States, July 2022. Shopify on Fiverr
All 127 Fiverr reviews

Related: Supabase user already registered · Supabase OAuth provider disabled · Supabase Auth session missing · Supabase Storage resource already exists

Questions

More on this error

Can Supabase merge two users?

Not directly. Move the data you need to the user you keep, unlink the identity from the other user, link it to the one you keep, then delete the empty user.

Why does automatic linking not catch this?

Automatic linking matches on email. A GitHub or Google account with a different email from the signed-in user is a separate identity, so it can belong to someone else.

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. This applies to the first 10 Launch Checks bought after October 30, 2026.

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; Simon replies by email, usually within one business day.