Describe the bug

In Auth.js, import firebase/auth.
import { onAuthStateChanged, getAuth } from 'firebase/auth'
define const auth. pass app imported from base.js into getAuth()
const auth = getAuth(app)
Next, in the useEffect, remove app.auth(). pass auth as first parameter in onAuthStateChanged.
onAuthStateChanged(auth, (user) => { setCurrentUser(user) setPending(false) });
!!REFERENCE!!
https://firebase.google.com/docs/auth/web/start
https://firebase.google.com/docs/auth/web/phone-auth
Describe the bug

In Auth.js, import firebase/auth.
import { onAuthStateChanged, getAuth } from 'firebase/auth'define
const auth. passappimported from base.js intogetAuth()const auth = getAuth(app)Next, in the useEffect, remove app.auth(). pass auth as first parameter in onAuthStateChanged.
onAuthStateChanged(auth, (user) => { setCurrentUser(user) setPending(false) });!!REFERENCE!!
https://firebase.google.com/docs/auth/web/start
https://firebase.google.com/docs/auth/web/phone-auth