2

So a user installs my app. He logs in with x@gmail.com. Logs out. Then, he decides he want to log in with y@gmail.com instead. So he presses on the Google Sign In button. But, it automatically signs him in with x@gmail.com instead of creating the account chooser dialog.

What I'd expect is that everytime he wants to log-in with Google, it asks him which account to use. However after logging in once, then logging out, it doesn't ask which account to sign in with and just uses the previous email.

Here's my Firebase logout code:

try {
File dir = context.getCacheDir();
deleteDir(dir);
} catch (Exception ignored) {}
FirebaseAuth.getInstance().signOut();
sweetAlertDialog.dismiss();
context.startActivity(new Intent(context, SignUp.class));

How can I prevent this?

Ali Bdeir
  • 4,151
  • 10
  • 57
  • 117
  • @qbix I've spent HOURS looking and found nothing! Thanks! – Ali Bdeir Sep 09 '16 at 14:30
  • This is how firebase works. You can only assign 1 sign-in method, firebase has documentation on this . A simple test : A user uses same email in facebook and google. Signs in to a firebase project from Google, then tries to login from facebook, he would see a google signin prompt even after confirming facebook signin. – Mr.Vibe Apr 11 '21 at 02:05

0 Answers0