I use OAuth to let users sign in to the android app via Google account. When the user taps the Google login button for the first time, it produces a dialog to choose the acc
Just add mGoogleSignInClient.signOut(); After succesfully handling sign in.
private void handleSignInResult(Task completedTask) {
try {
GoogleSignInAccount account = completedTask.getResult(ApiException.class);
AuthCredential credential = GoogleAuthProvider.getCredential(account.getIdToken(), null);
mAuth.signInWithCredential(credential).addOnCompleteListener(this, task -> {
if(task.isSuccessful()) {
mGoogleSignInClient.signOut();
updateUI();
} else {
Toast.makeText(this, "Something went wrong.", Toast.LENGTH_SHORT).show();
}
});
} catch (ApiException e) {
Log.w("SignIn Failed", "signInResult:failed code=" + e.getStatusCode());
updateUI(null);
}
}