Skip to content

Firebase Auth errorFirebase Auth: auth/email-change-needs-verification

auth/email-change-needs-verification is the Firebase Auth error whose message says multi-factor users must always have a verified email. Firebase’s docs don’t spell out exactly when it is thrown, but it points at an MFA user’s email being unverified or changed without verification.

Short answer

Change emails with verifyBeforeUpdateEmail(), so the new address only replaces the old one after the user clicks the link. Make sure users verify their email before they enroll a second factor.

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 Firebase wants a verified email, and the fix

  1. 01

    The account has MFA and an unverified email

    “Multi-factor users must always have a verified email.” Firebase, JS SDK auth errors (email-change-needs-verification)

    Firebase requires multi-factor users to have a verified email. Send a verification email and wait for confirmation before retrying.

  2. 02

    The new email isn’t verified before the change

    “You can use verifyBeforeUpdateEmail for Web and Android or sendEmailVerification(beforeUpdatingEmail:) for iOS instead.” Google Cloud, Email enumeration protection

    Google’s docs say that with email enumeration protection on, updateEmail() is no longer allowed. Use verifyBeforeUpdateEmail() on the web and Android, so the change applies once the new address is verified.

    import { verifyBeforeUpdateEmail } from 'firebase/auth';
    
    await verifyBeforeUpdateEmail(auth.currentUser!, newEmail);
    // The email changes after the user clicks the link.
  3. 03

    Users enroll MFA before verifying email

    “Ensure your app is verifying user emails. MFA requires email verification.” Firebase, Add multi-factor authentication to your web app

    Firebase’s MFA guide says to verify user emails, so require verification before the MFA enrollment screen.

  4. 04

    The project is newer than September 15, 2023

    “If you created your project on or after September 15, 2023, email enumeration protection is enabled by default.” Google Cloud, Email enumeration protection

    Also check: email enumeration protection is on by default for projects created on or after that date, which is why updateEmail() code from older tutorials can stop working.

Checked against the vendor’s docs on : Firebase JS SDK source: auth errors; Google Cloud docs: Email enumeration protection; Firebase docs: Add multi-factor authentication to your web app.

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/operation-not-allowed · Firebase auth/multi-factor-auth-required · Firebase auth/second-factor-already-in-use · Firebase invalid-verification-code

Questions

More on this error

Should I turn off email enumeration protection?

Google recommends leaving it on. Use verifyBeforeUpdateEmail instead of turning it off to make updateEmail work.

What is the iOS equivalent?

Google’s docs name sendEmailVerification(beforeUpdatingEmail:) for iOS.

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.