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);
}
Firebase Authentication currently only supports sending an OTP (for multi-factor authentication ) through SMS messages. Sending an OTP through email is not supported.
It's a valid request though, so I recommend filing a feature request for it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.