opened
charlesmccann
username_0
Using the example code, I modified it for my phonegap "app".  I'm running this on my Android device (Galaxy s7).  The .isAvailable() code runs fine. 

However, the .show() always calls the callback before the fingerprint has even been used.  So, when cancelling, these are the 2 alerts print every time:
success: OK withFingerprint: undefined
fail: Cancelled

Is this the desired behaviour? 
are we to watch for specific messages to know if it is truly success or failure?


FingerprintAuth.isAvailable(isAvailableSuccess, isAvailableError);

```
    isAvailableSuccess: function(result) {
        console.log("FingerprintAuth available: " + JSON.stringify(result));
        if (result.isAvailable) {
            FingerprintAuth.show({
                        clientId: "myAppName",
                        clientSecret: "a_very_secret_encryption_key"
                    }, app.successcallback, app.failcallback);
        }
    },
    successcallback: function(msg) {
        app.showData();
        alert("success: "+msg + " withFingerprint:" + msg.withFingerprint);
    },
    failcallback: function(msg) {
        alert("fail: " + msg);
    },

```
callbacks always called 
issue
created
PyriteParrot
username_1
+1
comment
created
mjwheatley
username_2
No that is not the desired behavior.  I recently added the callback for the cancel message and in doing so I probably caused this bug.  I will sort through the code and see if I can prevent the false success callback.
comment
created
mjwheatley
username_2
published v0.0.10 to resolve this issue
comment
closed
mjwheatley
username_2
issue
created
PyriteParrot
username_1
It's working correctly now. Thanks!
comment
created
charlesmccann
username_0
Yes, thank you!
comment