Ignore re-CAPTCHA verification for Firebase Phone Auth

I am new bee to IONIC and I am rolling into the issue where I can’t disable the re-captcha verifcation before sending OTP code.

I have done Phone Auth referring below link.

This works fine for desktop version. But in mobile(tried in android), I can’t receive the OTP code after re-captcha verifier. And also, this re-captcha is pretty difficult for elder people.

I also watched out the below link,

  1. How I do Remove reCAPTCHA box Firebase Phone Auth
  2. https://stackoverflow.com/questions/46878179/how-to-use-firebase-invisible-recaptcha-for-angular-web-app

I have also set below option ( ‘size’: ‘invisible’) from the above links but not yet fixed,

window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier(‘sign-in-button’, {
’size’: ‘invisible’,
‘callback’: function(response) {
// reCAPTCHA solved, allow signInWithPhoneNumber.

I couldn’t know how to achieve this. So, please guide me step by step manner.
Thanks in advance

1 Like

hey I created demo yesterday:

it takes other approach but works even better. If u run into any problems create an issue in the repository


1 Like

Hi AbuIonic,

Did you solve the problem?

I think your problem is you didn’t add your domain into your whitelist on Firebase.

You can try this way:

  • Go to firebase -> your app -> Authentication -> Sign-in method
  • In this page, find the Authorized domains and Add your custom domain. Example my custom domain is:

Hope this can help you.

I tried your method , it works perfectly. But building ionic app with --prod fails giving error
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
, after waiting for a long time.
Please look into the matter ASAP.

Did you check

I tried every method given on the page but end up getting the same result. Please try building yourself with --prod.

Issue solved with latest commit :wink:

1 Like

did you try the option below instead of --prod?
–aot --minifyjs --minifycss