I have react web app where I want to implement phone auth. I have initialized recaptchaVerifier based on docs and examples. However if I want to submit the form again (say
Just use window.recaptchaVerifier.reset() inside catch eg
const signInWithPhoneNumber = (fullMobile) => {
return new Promise((resolve, reject) => {
auth.signInWithPhoneNumber(fullMobile, window.recaptchaVerifier).then(res => {
resolve(res)
})
.catch(error => {
console.log(error)
window.recaptchaVerifier.reset()
reject(error)
})
})
}