问题
In my project at first by default 'one account per email' was enabled.
AuthCredential credential = FacebookAuthProvider.getCredential(token.getToken());
mAuth.signInWithCredential(credential)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Log.d(TAG, "signInWithCredential:success");
FirebaseUser user = mAuth.getCurrentUser();
Toast.makeText(LoginActivity.this, user.getDisplayName(), Toast.LENGTH_SHORT).show();
updateUI();
} else {
// If sign in fails, display a message to the user.
Log.w(TAG, "signInWithCredential:failure", task.getException());
Toast.makeText(LoginActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
}
}
});
I was getting authentication failed in toast message here.
Then I tried I enabling 'Multiple accounts per email', just to try that feature.
After that, I reverted back by again enabling 'one account per email'
But now firebase is creating multiple accounts even when I've disabled it in settings. I want it to again return auth failed if an account exists.
来源:https://stackoverflow.com/questions/45914494/firebase-one-account-per-email-is-enabled-still-firebase-creating-multiple-acc