title: How can I check if user exists in Firebase?
body: <p>I finally got my authentication to work in terms of creating users and logging in and out.  But now, I want to implement something that checks if the user already exists in Firebase.  I've looked it up but can't seem to find a concrete answer.  </p>
  
  <p>For example, if my email address is: abc12@gmail.com and someone else tries to signup with the same email address, how do I tell them it's already taken?  </p>
  
  <pre><code>login(e) {
      e.preventDefault();
  
      fire.auth().signInWithEmailAndPassword(this.state.email, this.state.password)
          .then((u) =&gt; {
          }).catch((error) =&gt; {
          console.log(error);
      });
  }
  
  signup(e) {
      e.preventDefault();
  
      fire.auth().createUserWithEmailAndPassword(this.state.email, this.state.password)
          .then((u) =&gt; {
          }).catch((error) =&gt; {
          console.log(error);
      });
  }
  </code></pre>