Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] :: TypeError: _base__WEBPACK_IMPORTED_MODULE_1__.default.auth is not a function #36

Open
irfan-zahir opened this issue Nov 2, 2021 · 2 comments

Comments

@irfan-zahir
Copy link

irfan-zahir commented Nov 2, 2021

Describe the bug
image

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

@BryceWayne
Copy link

Same issue

1 similar comment
@renensk
Copy link

renensk commented Nov 1, 2022

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants