Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When no fingerprints are enrolled - doesn't fall back to pin/password #79

Open
ccoplestone opened this issue May 7, 2019 · 2 comments

Comments

@ccoplestone
Copy link

ccoplestone commented May 7, 2019

Hi,

I can't seem to get the plugin to fall back to a PIN or Password if no fingerprints are enrolled.

// ios fingerprint logic
window.plugins.touchid.isAvailable(
    function () {
        window.plugins.touchid.verifyFingerprint(
            'Scan your fingerprint please', // this will be shown in the native scanner popup
            'Enter PIN/Password',
            function () {
                localStorage.setItem('access', '1');
                window.location.replace(window.location.href);
            }, // success handler: fingerprint accepted
            function () {
                if (err === "Cancelled") {
                    localStorage.removeItem('token');
                } else {
                    console.log("FingerprintAuth Error: " + err);
                }
            } // error handler with errorcode and localised reason
        );
    }, // success handler: TouchID available
    function (msg) {} // error handler: no TouchID available
)

Am I doing something wrong here, or is this an issue?

Any help will be greatly appreciated.

Cheers!

@danicholls
Copy link

Does this help you? #78

@ccoplestone
Copy link
Author

Does this help you? #78

Not quite, not what I'm after unfortunately. For now, if there are no fingerprints enrolled I've removed the token in localstorage and re-directed to the login page. Not ideal, but it'll work for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants