You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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) });
Describe the bug
In Auth.js, import firebase/auth.
import { onAuthStateChanged, getAuth } from 'firebase/auth'
define
const auth
. passapp
imported 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
The text was updated successfully, but these errors were encountered: