ashinga48 / React-Native-Firebase-Phone-Authentication

Seems there's not a proper react native plugin with phone authentication alone. So creating it.
9 stars 6 forks source link

RNFirebasePhoneAuth.sendOTP got 1 arguments, expected 3 #7

Closed ZnarKhalil closed 6 years ago

ZnarKhalil commented 6 years ago

I am trying to get verification code from firebase. i defined listenToOTP() functions and called it inside componentDidMount function, now when the user add his phone number and press confirm i call a redux action my action is defined in actions file like below: export const getCode= (phone) => { RNFirebasePhoneAuth.sendOTP(phone); }; but i get an error RNFirebasePhoneAuth.sendOTP got 1 arguments, expected 3

any help please?

ashinga48 commented 6 years ago

Oops I forgot to remove the unnecessary functions on the native side. it's due to that.

you can just pass empty functions

RNFirebasePhoneAuth.sendOTP(phoneNumber, ()=> {},()=> {});
ZnarKhalil commented 6 years ago

Thank you it's working now.

ManigandanRaamanathan commented 5 years ago

Oops I forgot to remove the unnecessary functions on the native side. it's due to that.

you can just pass empty functions

RNFirebasePhoneAuth.sendOTP(phoneNumber, ()=> {},()=> {});

How to verify the received OTP?