60秒后如何重新发送OTP。使用Firebase库,当前正在使用此
https://github.com/firebase/quickstart-js/blob/master/auth/phone-invisible.html
在首次发送OTP时称呼它
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button', {
});
工作正常,发送第一个OTP。但我已经添加了计时器,如果60秒。交叉。它将重新发送OTP按钮
不是它不发送Next OTP,所以我该如何实现呢?
在重新发送OTP时单击呼叫Same
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button', {
});
答案 0 :(得分:0)
关于重新发送的解决方案,我们不需要在“重新发送”按钮上单击相同的按钮,即“ window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button',{
}); instead we can directly call inner function
firebase.auth()。signInWithPhoneNumber(phoneNumber,appVerifier)`,以便重新发送otp。