使用createUserWithEmailAndPassword进行Firebase身份验证

时间:2016-11-02 09:51:08

标签: android firebase firebase-authentication

firebaseAuth.createUserWithEmailAndPassword("asdljhasd@gmail.com","asdasd2123")
                .addOnCompleteListener(MainActivity.this, new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(Task<AuthResult> task) {
                        progressDialog.hide();
                        if (task.isSuccessful()) {

                            //finally, the user is registered!
                            Toast.makeText(MainActivity.this, "Congratulations! you have been registered successfully!", Toast.LENGTH_SHORT).show();
                        } else {
                            Toast.makeText(MainActivity.this, "Register failed", Toast.LENGTH_SHORT).show();

                        }
                    }
                });
    }

我被困在进度对话框中,它没有注册任何身份验证。

0 个答案:

没有答案