Skip to content Skip to sidebar Skip to footer

Uncaught TypeError: Firebase.auth Is Not A Function

I try to build an authentification app with firebase (email & password) but i have problem with firebase methods. When I call firebase.auth, they said 'it's not a function'. Is

Solution 1:

Firebase products (eg. Auth) also need to be downloaded from the CDN

<script src="https://www.gstatic.com/firebasejs/7.6.0/firebase-auth.js"></script>

Reference: https://firebase.google.com/docs/web/setup


Solution 2:

You need to add firebase auth to the js file:

 <!-- Add Firebase products that you want to use -->
  <script src="https://www.gstatic.com/firebasejs/7.6.0/firebase-auth.js"></script>

You can check here for all available products to add:

https://firebase.google.com/docs/web/setup#available-libraries


Post a Comment for "Uncaught TypeError: Firebase.auth Is Not A Function"