Email OTP verification

Viewed 28

I am new to react js and firebase so I don't know how to get OTP through email. This code is only sending verification link to email but I want OTP in email.What changes I have to make in this code for getting OTP. Here is the Code-

const signup = () => {
  auth.createUserWithEmailAndPassword(user.email, user.password)
    .then((userCredential) => {
      // send verification mail.
      userCredential.user.sendEmailVerification();
      //auth.signOut();
      alert("Email sent");
    })
    .catch(alert);
}
1 Answers
Related