title: Firebase is not saving Facebook user in Auth list
body: <p>I am creating a single Activity for Facebook Login integrated with Firebase.</p>
  
  <p>I have actived the Facebook login in Firebase, followed all firebase steps and all Facebook steps in Facebook Developer Console also.</p>
  
  <p>My Activity has a com.facebook.widget.LoginButton and after click this button Facebook login page appears and I am able to enter credentials, autorize app and login.</p>
  
  <p>But, when I enter again in App, Login Button appear and Facebook login is not saved (cached).</p>
  
  <p>Firebase Auth user list is not being saved too.</p>
  
  <p>What could be wrong.</p>
  
  <p>My code below.</p>
  
  <pre><code>   @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      FacebookSdk.sdkInitialize(getApplicationContext());
      AppEventsLogger.activateApp(this);
      setContentView(R.layout.activity_login);
  
      mFirebaseUtils = new FirebaseUtils();
      mFirebaseUtils.setFirebase();
  
      try {
          @SuppressWarnings("rawtypes")
          Class strictModeClass = Class.forName("android.os.StrictMode");
          Class strictModeThreadPolicyClass = Class
                  .forName("android.os.StrictMode$ThreadPolicy");
          Object laxPolicy = strictModeThreadPolicyClass.getField("LAX").get(
                  null);
          @SuppressWarnings("unchecked")
          Method method_setThreadPolicy = strictModeClass.getMethod(
                  "setThreadPolicy", strictModeThreadPolicyClass);
          method_setThreadPolicy.invoke(null, laxPolicy);
      } catch (Exception e) {
      }
  
      // View Pager
      initData();
  
      mAuth = mFirebaseUtils.mAuth;
      mAuthListener = new FirebaseAuth.AuthStateListener() {
          @Override
          public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
              FirebaseUser user = firebaseAuth.getCurrentUser();
              if (user != null) {
                  // User is signed in
                  Log.d(TAG, "onAuthStateChanged:signed_in:" + user.getUid());
              } else {
                  // User is signed out
                  Log.d(TAG, "onAuthStateChanged:signed_out");
              }
          }
      };
  
  
      mCallbackManager = CallbackManager.Factory.create();
      LoginButton loginButton = (LoginButton) findViewById(R.id.btnLoginFacebook);
      loginButton.setReadPermissions("email", "public_profile");
      loginButton.registerCallback(mCallbackManager, new FacebookCallback&lt;LoginResult&gt;() {
          @Override
          public void onSuccess(LoginResult loginResult) {
              Log.d(TAG, "facebook:onSuccess:" + loginResult);
              handleFacebookAccessToken(loginResult.getAccessToken());
  
          }
  
          @Override
          public void onCancel() {
              Log.d(TAG, "facebook:onCancel");
  
  
          }
  
          @Override
          public void onError (FacebookException error){
              Log.d(TAG, "facebook:onError", error);
  
          }
      });
  }
  
  
  private void handleFacebookAccessToken(AccessToken token) {
      Log.d(TAG, "handleFacebookAccessToken:" + token);
      // [START_EXCLUDE silent]
      //showProgressDialog();
      // [END_EXCLUDE]
  
      AuthCredential credential = FacebookAuthProvider.getCredential(token.getToken());
      mAuth.signInWithCredential(credential)
              .addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;() {
                  @Override
                  public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                      Log.d(TAG, "signInWithCredential:onComplete:" + task.isSuccessful());
  
                      // If sign in fails, display a message to the user. If sign in succeeds
                      // the auth state listener will be notified and logic to handle the
                      // signed in user can be handled in the listener.
                      if (!task.isSuccessful()) {
                          Log.w(TAG, "signInWithCredential", task.getException());
                          Toast.makeText(LoginActivity.this, "Authentication failed.",
                                  Toast.LENGTH_SHORT).show();
                      }
  
                      // [START_EXCLUDE]
                      //hideProgressDialog();
                      // [END_EXCLUDE]
                  }
              });
  }
  
  
  public void signOut() {
      mAuth.signOut();
      LoginManager.getInstance().logOut();
  }
  
  
  public String getAndroidVersion() {
      String release = Build.VERSION.RELEASE;
      int sdkVersion = Build.VERSION.SDK_INT;
      return "Android SDK: " + sdkVersion + " (" + release +")";
  }
  
  @Override
  public void onStart() {
      super.onStart();
      mAuth.addAuthStateListener(mAuthListener);
      FirebaseUser user = mAuth.getCurrentUser();
  }
  
  @Override
  public void onStop() {
      super.onStop();
      if (mAuthListener != null) {
          mAuth.removeAuthStateListener(mAuthListener);
      }
  
  }
  
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      mCallbackManager.onActivityResult(requestCode, resultCode, data);
  }
  
  
  
  
  @Override
  public void onClick(View v) {
      switch (v.getId()) {
          //case R.id.button_facebook_signout:
          //    signOut();
          //    break;
      }
  }
  </code></pre>