我需要使用Firebase手机8月与FirebaseX插件。我试过这样做:
async getVerificationCode(): void {
const res:any = await this.firebaseX.verifyPhoneNumber('+16505553434', 60);
}但上面写着:
期望3-4个参数,但得到2.ts(2554) index.d.ts(347,96):没有为'phoneNumber‘提供一个参数。
"@ionic/angular": "5.1.1",
"@ionic-native/firebase-x": "^5.26.0",
"firebase": "7.15.0",知道怎么正确地使用这个吗?
API:
> verifyPhoneNumber(success: (value: string | object) => void, error:
> (err: string) => void, phoneNumber: string, timeoutDuration?: number):
> Promise<any>;
> /**
> * Signs the user into Firebase with credentials obtained using verifyPhoneNumber().
> * See the Android- and iOS-specific Firebase documentation for more info.
> * @param {object} credential - a credential object returned by the success callback of an authentication method
> * @param {function} success - callback function to call on successful sign-in using credentials
> * @param {function} error - callback function which will be passed a {string} error message as an argument
> */发布于 2020-06-12 12:47:59
它期待在你的论点之前进行两次回调。试一试
const res:any = await this.firebaseX.verifyPhoneNumber(() => {}, () => {}, '+16505553434', 60);https://stackoverflow.com/questions/62344543
复制相似问题