Giter VIP home page Giter VIP logo

Comments (6)

jmoren avatar jmoren commented on July 17, 2024 1

To make it work, I should change this line in the file:
node_modules/@ionic-native/firebase-authentication/index.d.ts#70
smsCode: Number -> smsCode: String

/**
* Asynchronously signs in using verificationId and 6-digit SMS code.
* @param verificationId Verification ID
* @param smsCode SMS code
*/
signInWithVerificationId(verificationId: string, smsCode: string): Promise<any>;

and this file
node_modules/@ionic-native/firebase-authentication/index.js#352
__metadata("design:paramtypes", [String, Number]), -> __metadata("design:paramtypes", [String, String]),

__decorate([
    Cordova({ sync: true }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String, String]),
    __metadata("design:returntype", Promise)
], FirebaseAuthentication.prototype, "signInWithVerificationId", null);

Was the only way to make it work...
Thanks.

from cordova-plugin-firebase-authentication.

chemerisuk avatar chemerisuk commented on July 17, 2024 1

Open issue at the ionic plugin repo, the bug there.

from cordova-plugin-firebase-authentication.

jmoren avatar jmoren commented on July 17, 2024

@chemerisuk I am doing something wrong?

this.firebaseAuthentication.signInWithVerificationId(this.verificationId, Number(code))

beacuse

this.firebaseAuthentication.signInWithVerificationId(this.verificationId, code)

is saying Argument of type 'string' is not assignable to parameter of type 'number'.ts(2345)

from cordova-plugin-firebase-authentication.

chemerisuk avatar chemerisuk commented on July 17, 2024

You don't need Number(code), just code as a string should work.

from cordova-plugin-firebase-authentication.

jmoren avatar jmoren commented on July 17, 2024

Well, actually that is the problem. If I put code as string, I got an error. If I put the code as Number, I got another error.
this.firebaseAuthentication.signInWithVerificationId(this.verificationId, Number(code)) Error with java
this.firebaseAuthentication.signInWithVerificationId(this.verificationId, code) Error compiling.

from cordova-plugin-firebase-authentication.

chemerisuk avatar chemerisuk commented on July 17, 2024

I looked at the source. Parameter code expected everywhere to be a string, not a number.

from cordova-plugin-firebase-authentication.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.