How to find out if an email is already registered with Firebase Simple Login?

前端 未结 4 1553
广开言路
广开言路 2020-12-30 06:10

I am using firebase (with Angularfire) for an html5 phone app. The user inputs only their email in the start screen, and then, depending on whether that email is already reg

4条回答
  •  悲&欢浪女
    2020-12-30 06:55

    You can add following codes before register()_method in your registerActivity.

    FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
    if(email.equals(user.getEmail().trim())) {
        Toast.makeText(this, "Email is taken", Toast.LENGTH_SHORT).show();
        return;
    }
    

提交回复
热议问题