title: Error in v-on handler: "auth is not a function" - Vue js
body: <p>I'm trying to use firebase in a VueJS project.</p>
  <p>My api credentials is defined in a file called fb.js</p>
  <pre><code>import firebase from 'firebase'
  
    var firebaseConfig = {
      apiKey: &quot;*****&quot;,
      authDomain: &quot;*****&quot;,
      projectId: &quot;*****&quot;,
      storageBucket: &quot;*****&quot;,
      messagingSenderId: &quot;******&quot;,
      appId: &quot;*****&quot;
    };
   export const fb = firebase.initializeApp(firebaseConfig);
   
  </code></pre>
  <p>I also tried to import the following modules, but it still doesn't work:</p>
  <pre><code>import firebase from &quot;firebase/app&quot;;
  import &quot;firebase/auth&quot;;
  </code></pre>
  <p>My Login/index.js</p>
  <pre><code>&lt;template&gt;
    &lt;v-app&gt;
        &lt;v-content&gt;
            &lt;v-container class=&quot;fill-height&quot; fluid&gt;
              &lt;v-row align=&quot;center&quot; justify=&quot;center&quot;&gt;
                  &lt;v-col cols=&quot;12&quot; sm=&quot;4&quot; md=&quot;4&quot;&gt;
                      &lt;v-card class=&quot;elevation-12&quot;&gt;
                          &lt;v-card-text class=&quot;pa-7 mt-12&quot;&gt;
                              &lt;v-row&gt;
                                  &lt;v-col cols=&quot;12&quot; md=&quot;8&quot;&gt;
                                      &lt;router-link to=&quot;/&quot;&gt;
                                          &lt;v-img  max-width=&quot;230px&quot; src=&quot;/logo.png&quot; &gt; &lt;/v-img&gt;
                                      &lt;/router-link&gt;
                                  &lt;/v-col&gt;
                              &lt;/v-row&gt;
                              &lt;h2 class=&quot;text-center mt-10 mb-5&quot;&gt;Sign in to your BienSaude account&lt;/h2&gt;
                              &lt;div class=&quot;text-center mb-4&quot;&gt;
                                  Don't have an account? 
                                  &lt;router-link to=&quot;/register&quot;&gt;
                                      &lt;a class=&quot;primary--text text-decoration-underline&quot;&gt;Register&lt;/a&gt; 
                                  &lt;/router-link&gt;
                              &lt;/div&gt;
                              &lt;v-form v-model=&quot;valid&quot; class=&quot;valid&quot;&gt;
                                  &lt;v-text-field
                                  v-model=&quot;email&quot;
                                  label=&quot;Email&quot;
                                  name=&quot;Email&quot;
                                  prepend-icon=&quot;email&quot;
                                  type=&quot;text&quot;
                                  color=&quot;primary&quot;
                                  :rules=&quot;emailRules&quot;
                                  /&gt;
                                  &lt;v-text-field
                                      v-model=&quot;password&quot;
                                      prepend-icon=&quot;lock&quot;
                                      :append-icon=&quot;show ? 'visibility' : 'visibility_off'&quot;
                                      :rules=&quot;[rules.required]&quot;
                                      :type=&quot;show ? 'text' : 'password'&quot;
                                      name=&quot;password&quot;
                                      label=&quot;Enter Password&quot;
                                      @click:append=&quot;show = !show&quot;
                                  &gt;&lt;/v-text-field&gt;
                              &lt;/v-form&gt;
                              &lt;div class=&quot;text-center my-7&quot;&gt;
                              &lt;v-btn color=&quot;primary&quot;  :disabled=&quot;!valid&quot; id=&quot;custom-disabled&quot; @click=&quot;login&quot;&gt; SIGN IN&lt;/v-btn&gt;
                              &lt;/div&gt;
                              &lt;div&gt;
                                  &lt;div class=&quot;text-center primary--text text-decoration-underline&quot; href=&quot;#four&quot;&gt;
                                      &lt;a&gt;Forget your password?&lt;/a&gt; 
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/v-card-text&gt;   
                      &lt;/v-card&gt;
                  &lt;/v-col&gt;
              &lt;/v-row&gt;
            &lt;/v-container&gt;
        &lt;/v-content&gt;
    &lt;/v-app&gt;
  &lt;/template&gt;
  &lt;script&gt;
  
  import fb from '@/fb'
  
  export default {
      
  
      data: () =&gt; ({
          step: 1,
          show: false,
          show1: false,
          valid:false,
          password: '',
          email: '',
          emailRules: [
          v =&gt; !!v || 'E-mail is required',
          v =&gt; /^(([^&lt;&gt;ºª*+`´!&quot;#$%=&amp;/()\]\\.,;:\s@&quot;]+(\.[^&lt;&gt;()\]\\.,;:\s@&quot;]+)*)|(&quot;.+&quot;))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,24}))$/.test(v) || 'E-mail must be valid',
        ],
        rules: {
          required: (value) =&gt; !!value || &quot; Password required.&quot;,
          
        },  
      }),
  
      props: {
          source:String
      },
  
      methods: {
          login(){
              fb.auth().signInWithEmailAndPassword(this.email, this.password)
              .then( data =&gt; {
              data.user
              this.$router.replace('user');
          })
                  .catch(function(error) {
                      // Handle Errors here.
                      var errorCode = error.code;
                      var errorMessage = error.message;
                      if (errorCode === 'auth/wrong-password') {
                          alert('Wrong password.');
                      } else {
                          alert(errorMessage);
                      }
                      console.log(error);
                  });
      },
      },
  };
  &lt;/script&gt;
  </code></pre>
  <p>In my registration I have the code -fb.auth (). SignInWithEmailAndPassword (this.email, this.password) - but for registration and &quot;auth ()&quot; works correctly</p>