我遇到问题,当我尝试通过Firebase身份验证使用电子邮件/密码登录时。我已经在SIGN-IN-METHOD选项卡中启用了电子邮件/密码。但每当我在同一个应用程序中注册时,它就允许我在Firebase控制台用户列表中插入记录,但是当我尝试使用已注册的电子邮件&密码我无法前进,异常消息是:
密码无效或用户没有密码。
登录时,我的代码是:
FirebaseAuth auth=FirebaseAuth.getInstance();
auth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(LoginActivity.this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
pb.dismiss();
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Intent intent = new Intent(LoginActivity.this, DrawerActivity.class);
startActivity(intent);
finish();
} else {
// If sign in fails, display a message to the user.
// Log.w("Tag", "Tag signInWithEmail:failure", task.getException());
Log.i("Tags", "Tags signInWithEmail:failure" + task.getException());
Toast.makeText(LoginActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
}
}
});