when new user create it signIn automatically in firebase in javascript

Viewed 1008

Is there a way of using "createUserWithEmailAndPassword" ? The reason I'm asking is because I want that the email gets verified before the user can logIn.

firebase.auth().createUserWithEmailAndPassword(mailId, password).then(function(data){
            console.log("user created");
firebase.auth().currentUser.sendEmailVerification().then(function() {
            console.log("verification email send");
            })
        }).catch(function(error) {
   console.log("error.message");
 })

This code signin user automatically and send the verification mail to user. Is there any way to verify email first than signIn.

1 Answers
Related