Firebase: One account per email is enabled still, firebase creating multiple accounts with same email

落花浮王杯 提交于 2019-12-12 15:16:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!