Skip to content

Firebase Auth errorFirebase Auth: auth/user-mismatch

auth/user-mismatch is the Firebase Auth error a reauthentication throws when the credentials belong to a different user than the one signed in. The SDK compares the user ID in the new token with the current user and fails if they differ.

Short answer

Reauthenticate with the signed-in user’s own account: build email credentials from currentUser.email, and pass login_hint to the Google popup so the right account is picked. Show a clear message asking for the same account, and retry. If the account was deleted, sign the user out.

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 accounts don’t match, and the fix

  1. 01

    The user picked another Google account

    “The supplied credentials do not correspond to the previously signed in user.” Firebase JS SDK, Firebase JS SDK auth errors (user-mismatch)

    The popup shows every Google account in the browser, and the user chose a different one. Pre-select the current one with login_hint and say which account to use.

    import { getAuth, GoogleAuthProvider, reauthenticateWithPopup } from 'firebase/auth';
    
    const auth = getAuth();
    const provider = new GoogleAuthProvider();
    provider.setCustomParameters({ login_hint: auth.currentUser.email });
    await reauthenticateWithPopup(auth.currentUser, provider);
  2. 02

    The reauth form takes a typed email

    “When this happens, re-authenticate the user by getting new sign-in credentials from the user and passing the credentials to reauthenticateWithCredential.” Firebase, Manage users (re-authenticate a user)

    A form that asks for both email and password lets the user type another account. Fill the email from currentUser.email, lock the field, and ask only for the password.

    import { EmailAuthProvider, reauthenticateWithCredential } from 'firebase/auth';
    
    const user = auth.currentUser;
    const credential = EmailAuthProvider.credential(user.email, password);
    await reauthenticateWithCredential(user, credential);
  3. 03

    The account was deleted

    If the user was deleted in the console or by an admin script, the SDK turns the user-not-found result into this same code. Sign the user out and send them to sign-up or sign-in.

  4. 04

    The sensitive action ran anyway

    Also check: the failed reauthentication leaves the old session in place. Run the delete, email change or password change only after reauthentication succeeds.

Checked against the vendor’s docs on : Firebase docs: Manage users (re-authenticate a user); Firebase JS SDK source: auth errors; Firebase JS SDK source: reauthenticate.ts.

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: Firebase auth/requires-recent-login · Firebase auth/multi-factor-auth-required · Firebase auth/credential-already-in-use · Firebase user-token-expired

Questions

More on this error

Does auth/user-mismatch sign the user out?

No. The current user stays signed in; only the reauthentication failed.

Can it happen with Apple sign-in?

Yes. Any provider can return a different account; the SDK compares user IDs, not providers.

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.