How to fix auth/user-not-found in Firebase

FirebaseBEGINNERMEDIUMUpdated Dec 22, 2025· 226 views

The "auth/user-not-found" error occurs when Firebase cannot locate a user account matching the provided email or identifier. This happens when users attempt to sign in with an unregistered account, incorrect email, or after account deletion.

Quick fix

Fixes auth/user-not-found

1. Go to your [Firebase Console](https://console.firebase.google.com)
  1. Verify the user exists in Firebase Console
  2. Implement proper error handling in your sign-in code
  3. Provide a sign-up option in your login flow
  4. Check for email typos and provide validation
firebase — error
1. Go to your [Firebase Console](https://console.firebase.google.com)
auth/user-not-found

What this error means

The "auth/user-not-found" error indicates that Firebase Authentication searched its database and found no user record matching the identifier (email, phone number, or UID) provided during the sign-in attempt. This error is a security feature that prevents unauthorized access and helps users understand why their login failed. When this error occurs, it means the authentication system is working correctly—it simply cannot verify the user exists.

Typical symptoms

  • Sign-in attempts fail with error code "auth/user-not-found"
  • Login form displays "User not found. Please check your email or register" message
  • Users cannot access their account after email/password sign-in
  • Admin SDK getUser() method throws "There is no user record corresponding to the provided identifier"
  • Password reset emails fail silently or display user-not-found errors

Common causes

  1. User has not yet created an account in your Firebase Authentication database
  2. Typo or incorrect email address entered in the sign-in form
  3. User previously deleted their account
  4. Attempting to sign in with the wrong authentication method (e.g., phone auth when email/password was used)
  5. Case-sensitivity issue (though Firebase email is case-insensitive)

How to fix "auth/user-not-found"

1Verify the user exists in Firebase Console

First, check if the user account actually exists:

javascript
1. Go to your [Firebase Console](https://console.firebase.google.com)

2. Navigate to Authentication > Users
3. Search for the email address the user is trying to sign in with
4. If the user is not listed, they have not created an account yet

If the user exists but sign-in is still failing, the issue may be with your code implementation.

2Implement proper error handling in your sign-in code

Add specific error handling to distinguish "user-not-found" from other authentication errors:

Web/JavaScript:

javascript
import { signInWithEmailAndPassword, getAuth } from "firebase/auth";

const auth = getAuth();
signInWithEmailAndPassword(auth, email, password)
  .catch((error) => {
    if (error.code === "auth/user-not-found") {
      console.log("User account does not exist. Please sign up.");
      // Redirect to registration page
    } else if (error.code === "auth/wrong-password") {
      console.log("Incorrect password.");
    } else {
      console.log("Login error:", error.message);
    }
  });

Admin SDK (Node.js):

javascript
const admin = require("firebase-admin");

admin.auth().getUserByEmail("user@example.com")
  .then(userRecord => {
    console.log("User found:", userRecord.uid);
  })
  .catch(error => {
    if (error.code === "auth/user-not-found") {
      console.log("User does not exist in Firebase Authentication.");
    }
  });
3Provide a sign-up option in your login flow

Help users who don't have an account by offering an easy registration path:

1. Add a "Don't have an account? Sign up" link in your login form
2. Redirect to your registration page when the error is caught
3. Allow users to create a new account with email and password
4. Send a welcome email after successful registration

This improves user experience and reduces sign-in failures.

4Check for email typos and provide validation

Implement client-side email validation to catch common mistakes:

javascript
// Basic email format validation
const isValidEmail = (email) => {
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  return emailRegex.test(email);
};

if (!isValidEmail(email)) {
  console.log("Please enter a valid email address.");
  return;
}

// Show email format feedback to users
const emailInput = document.getElementById("email");
emailInput.addEventListener("blur", () => {
  if (!isValidEmail(emailInput.value)) {
    emailInput.classList.add("error");
  }
});

Also consider suggesting common email typos when sign-in fails.

5Use email enumeration protection for security

Firebase includes email enumeration protection by default. This means the "auth/user-not-found" error message is intentionally vague to prevent attackers from determining which emails are registered in your system.

If you're implementing additional security:

1. Log authentication attempts server-side for audit trails
2. Monitor for repeated failed login attempts from the same IP
3. Implement rate limiting to prevent brute force attacks
4. Use Admin SDK server-side operations for sensitive checks instead of exposing them client-side

Advanced notes

When using reauthenticateWithCredential() on certain platforms (like iOS), Firebase may translate the "auth/user-not-found" error to "auth/user-mismatch" in some cases. This is platform-specific behavior. If using Firebase Emulator, ensure your projectId is configured correctly in both initializeApp() and your test initialization—removing it from only one location can cause user-not-found errors. For Admin SDK operations, always wrap getUser() calls in try-catch blocks, as user not found throws an exception rather than returning null.

Frequently asked questions

What does "auth/user-not-found" mean?
The "auth/user-not-found" error indicates that Firebase Authentication searched its database and found no user record matching the identifier (email, phone number, or UID) provided during the sign-in attempt. This error is a security feature that prevents unauthorized access and helps users understand why their login failed. When this error occurs, it means the authentication system is working correctly—it simply cannot verify the user exists.
How do I fix "auth/user-not-found"?
The "auth/user-not-found" error occurs when Firebase cannot locate a user account matching the provided email or identifier. This happens when users attempt to sign in with an unregistered account, incorrect email, or after account deletion.
What causes "auth/user-not-found"?
User has not yet created an account in your Firebase Authentication database Typo or incorrect email address entered in the sign-in form User previously deleted their account
Is the "auth/user-not-found" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading