Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

437
Views
TypeError: Cannot read properties of undefined (reading 'create') Firebase authentication sigin error

GitHub issue link https://github.com/firebase/firebase-js-sdk/issues/5840

Operating System version: MacOS Monterey 12.1 Browser version: Chrome Version 96.0.4664.110 (Official Build) (x86_64) Firebase SDK version: 9.6.1 Firebase Product: Authentication_

When trying to Login user by firebase signInWithEmailAndPassword method, the below error is occurring.

backend/node_modules/@firebase/auth/dist/node/index-fe696f9c.js:506
      return (_a = authOrCode._errorFactory).create.apply(_a, tslib.__spreadArray([code], fullParams));
                                             ^

TypeError: Cannot read properties of undefined (reading 'create')
  at createErrorInternal (/node_modules/@firebase/auth/dist/node/index-fe696f9c.js:506:48)
  at _createError (node_modules/@firebase/auth/dist/node/index-fe696f9c.js:484:32)
  at Timeout._onTimeout (/node_modules/@firebase/auth/dist/node/index-fe696f9c.js:1091:31)
  at listOnTimeout (node:internal/timers:557:17)
  at processTimers (node:internal/timers:500:7)

Authentication method is used in backend side ( NodeJS ) and below is the method

const { signInWithEmailAndPassword, signInWithCustomToken } = require("firebase/auth");
    const { auth, db } = require("../../utils/firebaseClient");

    signInWithEmailAndPassword(auth, email, password). // Failsexactly at this step 
        .then(async(userCredential) => {}) 
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Import "getAuth" instead of "auth" and when you pass it into the signInwithEmailAndPassword method make sure to call it like:

signInwithEmailAndPassword(getAuth(), email, password)

Calling that getAuth function will make sure to get your default app's auth module instance, which is then used to login with the given email and password.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!