Google/Firebase reCaptcha not working with angular

Although this is not explicitly an Ionic issue, it benefits all of us!

Firebase/Digits announced they were joining back in Jan and just a few weeks ago announced phone auth it now available on firebase!

Following documentation for new Firebase phone authentication. They have introduced a recaptcha as a security/spam measure. According to the js documentation the recaptcha is injected into the DOM with:

window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier(‘recaptcha-container’);

However this does not appear to work in AngularJS. I have tried swapping out window. for $window and ensured this was available in my controller, but still no luck.

Any help or guidance would be greatly appreciated.

This is the js documentation I’ve been following: https://firebase.google.com/docs/auth/web/phone-auth