Firebase - How to check whether a user has already signed up using Phone Number

后端 未结 7 1545
梦毁少年i
梦毁少年i 2021-01-04 02:57

I am using firebase phone Authentication . When a user creates a account using phone number and next time he creates account with same phone number Than I want to show a m

7条回答
  •  孤独总比滥情好
    2021-01-04 03:19

    onTask result check FirebaseAuthUserCollisionException

    if (task.getException() instanceof FirebaseAuthUserCollisionException) {
        Toast.makeText(Signup.this, "User already exist.",  Toast.LENGTH_SHORT).show();
    }
    

提交回复
热议问题