【问题标题】:how to resend mobile otp如何重新发送移动otp
【发布时间】:2019-09-03 11:26:19
【问题描述】:

使用 Firebase OTP 通知。不能重复使用

window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button', { 

用于在计时器完成后重新发送 otp。

https://github.com/firebase/quickstart-js/blob/master/auth/phone-invisible.html

我正在使用这个库。

window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('sign-in-button', { 

});

我想在点击“重新发送”后重用它,但它显示错误:

未捕获的错误:reCAPTCHA 已在此元素中呈现

【问题讨论】:

    标签: javascript firebase mobile firebase-authentication


    【解决方案1】:

    如果您在同一个元素容器中重新呈现 reCAPTCHA,您必须先调用recaptchaVerifier.clear() 将其清除,然后重新初始化它。

    【讨论】:

    猜你喜欢
    • 2020-01-08
    • 2022-12-06
    • 2020-02-16
    • 1970-01-01
    • 2015-05-16
    • 2022-01-25
    • 2020-11-05
    • 1970-01-01
    • 2016-10-21
    相关资源
    最近更新 更多