1
votes

I am using this plugin cordova-plugin-firebase-authentication

I could not use methods in that plugin, for example verifyPhoneNumber cordova.plugins.firebase.auth.verifyPhoneNumber("+123456789").then(function(verificationId) { // pass verificationId to signInWithVerificationId }); Here I get the error Cannot find name 'cordova'.

So I used this as

firebase.auth.verifyPhoneNumber("+123456789").then(function(verificationId) { // pass verificationId to signInWithVerificationId }); added import as import * as firebase from 'firebase';.

But I am getting the error :

property verifyPhoneNumber does not exist on type 'typeof auth'.

I am very new to ionic, What am I doing wrong here.

1

1 Answers

-2
votes

Try doing this

new firebase.auth.PhoneAuthProvider().verifyPhoneNumber("+123456789").then(function(verificationId) {
// pass verificationId to signInWithVerificationId
});

According to the docs