Firebase invisible recaptcha

All of a sudden got a problem with logging with Firebase.
Got an error for the invisble recaptcha: RecaptchaVerifier failed: First argument “recaptchaContainer” must be a valid string or an HTML element.

We thought the view needed an html element, so we sought the solution in updating. Now we can’t even login.

Using Firebase auth (Baumblatt solution)
Anybody having a similar problem?

Any help apreciated!!

Have a nice weekend!

floeby

This is what I do. Not fully angularish, but at least works


 setRecaptcha() {
    if (this.recaptchaVerifier && ('clear' in this.recaptchaVerifier)) {
      console.log('Clearing recaptcha');
      this.recaptchaVerifier.clear();
      document.getElementById('recaptcha-container').innerHTML = '<div id=\'send-confirm-button\'></div>';
    }

    this.recaptchaVerifier = new firebase.default.auth.RecaptchaVerifier('send-confirm-button', {
      size: 'invisible',

I noticed I needed to have non-angular control over the DOM. Especially at the page lifecycle events or when verification failed