title: How to determine if a Firebase user is signed in using email and password authentication
body: <p>I'm using Firebase authentication. The user can log in via e-mail password, google and facebook. How do I know if a user is logged in using an email-password? I looked at <a href="https://stackoverflow.com/questions/38619628/how-to-determine-if-a-firebase-user-is-signed-in-using-facebook-authentication?answertab=active#tab-top">this answer</a></p>
  
  <p>and i tried this:</p>
  
  <pre><code>for (UserInfo user: FirebaseAuth.getInstance().getCurrentUser().getProviderData()) {
      if (!(user.getProviderId().equals("facebook.com") || user.getProviderId().equals("google.com"))) {
          System.out.println("User is signed in with Email");
      }
  }
  </code></pre>
  
  <p>But when I use both google and email passwords if statement being true.</p>