Nativescript fingerprint auth plugin - can't log anything after verifyFingerprint promise

Viewed 492

My goal is to add a biometric option to my nativescript app. The user gets a prompt in which i'm waiting for his authentication. if authenticated - I want to console.log("Great"). and if not log "Problem".

I'm building it using Angular + Nativescript, so I registered Fingerprint as as provider, imported it and on constructor decalred:

constructor(private fingerprintAuth: FingerprintAuth);

And for the verifyFingerPrint, when page loads I call:

this.fingerprintAuth.available()
                .then((result: BiometricIDAvailableResult) => {
                    console.log(`Biometric ID available? ${result.any}`);
                    if(result.any) {
                        if(result.face) {
                            console.log("HANDLE FACE WILL BE HERE SOON!");
                        }

                        if(result.touch) {
                            console.log("If not face, then touch id. Let's try it.");

                            this.fingerprintAuth.verifyFingerprint(
                                {
                                    title: "Biometric Verification",
                                    message: "Let's just make sure it's you..."
                                })
                                .then((data) => console.log("Authenticated, contacting server now...", data))
                                .catch((e) => console.log("Problem occured while authenticated.", e))
                        }
                    } else {
                        console.log("No Biometric Option is available, try adding one.");
                    }
                });
    }

The problem is, I am getting the fingerprint prompt as expected, but after a good or bad verification I never get the console.log part. .then / .catch - both won't log anything

And i'm not getting any errors..

I'm using sidekick, local build on a Pixel 3 XL API 28 Emulator, Plugin name:nativescript-fingerprint-auth Nativescript + Angular Project

What could be the problem..?

Thanks!

0 Answers
Related