chemerisuk / cordova-plugin-firebase-authentication

Cordova plugin for Firebase Authentication
MIT License
98 stars 60 forks source link

this.firebaseAuthentication.verifyPhoneNumber(...).then is not a function #57

Open hdung912 opened 5 years ago

hdung912 commented 5 years ago

Hi All i did try using plugin but when i try call verifyPhoneNumber i have issues like above signIn() { this.firebaseAuthentication.verifyPhoneNumber("+123123", 30000).then((verificationId) => {

  console.log(verificationId);
});

}

arghyaExicube commented 5 years ago

did you get any solutions? i have facing the problem.

Drmorph commented 5 years ago

same problem here

venkateshwaranks1996 commented 5 years ago

Same issue

lordonnance commented 5 years ago

This error occurs to me when I'm debugging on browser.

On Android device it's running OK

Drmorph commented 5 years ago

@Lordonnance This error occurs to me when I'm on debug and on release IOS

ironbone commented 5 years ago

I get the same but with createUserWithEmailAndPassword

mavilla-vishnu commented 5 years ago

same problem...

uzbekjon commented 5 years ago

You will get this error in non-cordova environment such as browser (since this plugin does not have support for browser). You should not see this error when you run your app on a device.

Sagun085 commented 5 years ago

Doesn't make any difference. I'm running it on my device and still the same error. ERROR

uzbekjon commented 5 years ago

@Sagun085 read the warning message above the error. Seems like you did not install the plugin.

Sagun085 commented 5 years ago

Nice catch @uzbekjon Thanks, actually I was using the older version of cordova(8.0). After updating Cordova from 8 to 9.0.0 and installing the plugins:

$ ionic cordova plugin add cordova-plugin-firebase-authentication $ npm install @ionic-native/firebase-authentication

I could not build the app! it failed! tried multiple times!

errors

qmonmert commented 5 years ago

Same bug than @Sagun085 for me :(

pkitatta commented 5 years ago

@Sagun085 same here. I get the error when I install the plugin, the error goes away when I remove the plugin. Did you get a work around?

IngAjVillalon commented 4 years ago

That is not a problem in itself of the plugin, but of its development logic. Before executing any function of the plugin, you must be sure that cordova is running:

this.platform.ready().then(() => {
   if(this.platform.is('hybrid')) {
      this.firebaseAuthentication.verifyPhoneNumber(...)
         .then(...)
   }
});

I just made it work fine with no problem in Ionic 5. My application runs very well with the login with Phone, Google, and Facebook. It worked fine with Capacitor (v2) and Cordova (v9).

ahsan-alii commented 4 years ago

still having the same error @IngAjVillalon can you please elaborate a bit how did you solved this issue ?

DevNiklesh commented 4 years ago

@IngAjVillalon I'm working with ionic-capacitor and I'm not receiving phone verification sms after generating signed apk. Could you help me with it?

IngAjVillalon commented 4 years ago

Ok, I'll make a demo and repository so It can help you.

DevNiklesh commented 4 years ago

@IngAjVillalon would love to see your demo!!... But I kinda solved the issue after scratching my head for 1 full day

To anyone facing similar issue like mine..

How to check it? (Incase, you are a rookie like me😅)

Also remember that you will receive SMS only after uploading in Google Store.. in order to test your app provide your testing number in Authentication-->sign in methods-->phone authentication

Glad to help.. incase I'm wrong.. kindly correct me!