How to create user and upload data on Firebase in one single transaction

后端 未结 4 1724
情书的邮戳
情书的邮戳 2021-01-20 14:28

I am making a web application which creates a user on Firebase using email and password firebase.auth().createUserUsingEmailAndPassowrd()

After the account

4条回答
  •  感情败类
    2021-01-20 14:37

    You can do it in your OnComplete method of createUserUsingEmailAndPassowrd().

    mAuth.createUserWithEmailAndPassword(email, password)
            .addOnCompleteListener(this, new OnCompleteListener() {
                @Override
                public void onComplete(@NonNull Task task) {
    
                  if (task.isSuccessful()) {
                       //Create your user in DB here
    
                    }
                }
            });
    

提交回复
热议问题