sandeepdillerao / cordova-plugin-otp-auto-verification

13 stars 10 forks source link

Not working. Success failure not fired #10

Closed prantikv closed 6 years ago

prantikv commented 6 years ago

I am trying to use the plugin with ionic 3. Here is my code. I am declaring the variable as follows

declare var OTPAutoVerification; After which in my component I have a start() function that will start the listener.

start() {
    console.log("started");
    var options = {
      delimiter : "code is",
      length : 6,
      origin : "My cell number"
    };
    OTPAutoVerification.startOTPListener(options, ()=>{
      console.log("success");
    }, ()=>{
      console.log("failure");
    });

  }

Here is my ionic info


    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 25.2.5
    Node              : v8.9.4
    npm               : 5.6.0
    OS                : Windows 10
sandeepdillerao commented 6 years ago

Fixed in latest release 1.0.1 please update plugin to 1.0.1