Firebase RecaptchaVerifier.clear() has no effect

前端 未结 4 1165
旧巷少年郎
旧巷少年郎 2021-01-15 01:18

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

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-15 01:44

    I have got the same issue with React. but there is a problem of Ref. so I have created a new instance using Id of a parent div element

    this.recaptchaWrapperRef = ref}>

    In the submit callback add this.

    document.getElementById("recaptcha-container").innerHTML = "
    ";

提交回复
热议问题