0

I am trying to use FirebaseAuth.getInstance().signOut(); but I can't select another account after the logout. Right now the login and logout are in different activities, the LoginActivity have the normal Google login from the Firebase documentation, and the logout activity is a Drawer with the LogoutBtn like this:

case R.id.initiates_logout:
        if(FirebaseAuth.getInstance().getCurrentUser()!=null){
            new AlertDialog.Builder(this)
                    .setTitle("Text1")
                    .setMessage("Text2")
                    .setIcon(android.R.drawable.ic_dialog_alert)
                    .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                            FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
                            user.unlink(user.getProviderId());
                            FirebaseAuth.getInstance().signOut();
                            LoginManager.getInstance().logOut();


                        }})
                    .setNegativeButton(android.R.string.no, null).show();
        }
        break;

I also try this solution Firebase logout is not working but nothing work.

TofferJ
  • 4,678
  • 1
  • 37
  • 49

0 Answers0