Firebase Ionic problem 2 with authentication by mobile number


#1

I am creating a system of authentication by number of cell phone in ionic 2, for that I use the google guide
Https://firebase.google.com/docs/auth/web/phone-auth

First i believe a firebase.auth.RecaptchaVerifier (Is one of the necessary parameters)

this.autVer = new firebase.auth.RecaptchaVerifier(‘contCatcha’, {
‘size’: ‘invisible’,
‘callback’: function (response) {
// reCAPTCHA solved, allow signInWithPhoneNumber.
}
});

and laster use auth.signInWithPhoneNumber angularfire

this.afAuth.auth.signInWithPhoneNumber("+57" + this.numeroCelular, this.autVer).then(verificationId => {
console.log(“SMS Enviado”);
this.confor = verificationId;
this.loading.dismiss();
this.estado = 1;
this.esperarCodigo();
})
Where the second parameter is the firebase.auth.RecaptchaVerifier created

In the browser of my pc everything works fine, but on the mobil shows the following error message:

I need to replace that firebase.auth.RecaptchaVerifier, but I do not know if there is any plugin or sub meter to do and ahcer that everything works
I really appreciate your advice

I leave my code


#2

Following. I wasted all my day and ultimately reached to the same error when ran it on a device. Is there no way to get around this limitation? Or Is there any other way to send OTPs to user’s phone using Firebase?

If no, Google took over Digits and ruined it for us Ionic Devs.


#3

Check this:


#4

Will your cordova plugin work with Ionic1? Also, can you provide a quick README on GitHub on how to implement?


#5

@isaacch did you solve this error?