Code Monkey home page Code Monkey logo

cordova-plugin-touch-id's Issues

Use evaluatedPolicyDomainState to detect when a finger is enrolled or removed

It's a new iOS 9 property for the LocalAuthentication.framework.

Actually when adding a new fingerprint this plugin will just work with the new fingerprint, but what if the device code is hijacked and a new fingerprint added by the hijacker. He can then just unlock any app that uses this plugin with that new fingerprint.

See this for more details: https://godpraksis.no/2016/03/fingerprint-trojan/

And this for an example implementation: https://github.com/dannycabrera/DotNetMiami/blob/master/ViewController.cs

Prevent Passcode

Hello,

I'm using your plugin and it works really great.
But I want to prevent the user from entering his passcode if fingerprint scanning failed.
How can I do this ?

verifyFingerPrint with FingerPrint or Passcode

While using verifyFingerPrint method, is there any way to identify whether user has used actual fingerprint to authenticate or passcode. Right if we use passcode or fingerprint we are getting null as response. So we are not able to differentiate fingerprint authentication and passcode authentication.

2 Compiling Errors and 1 deprecation warning

Thanks for the plugin! I haven't been able to compile my application I am getting the following

Errors:

  • unrecognized platform name iOS in TouchID.m line 26
  • property 'biometryType' not found on object of type 'LAContext *' in TouchID.m line 27

Warning:

  • 'kSecUseNoAuthenticationUI' is deprecated: first deprecated in ios 9.0 - Use a kSecUseAuthenticationUI instead.

Can you help Please!

enter passcode page

by using this method "window.plugins.touchid.verifyFingerprintWithCustomPasswordFallback" , i am not getting the default enter passcode page after clicking on "Enter Password" button (i am not getting any default screen), whereas by using the method "window.plugins.touchid.verifyFingerprint" i will get the default passcode page, can you please suggest why this is happening.

Any method to get the id_token of touch/faceid scan?

Each time a user initiates authentication with a valid fingerprint, Touch ID retrieves the private key from the keystore, creates a token, signs it with the private key and sends it to Auth0. Auth0 then returns an id_token, the user profile and, optionally, a refresh_token.

Any method to retrieve the tokens and profile?

thanks for the plugin Eddy!

Securely store/retrieve data using fingerprint

Correct me if I'm wrong, but it looks like this library only gives a yes/no on whether the fingerprint matched. It does not allow me to securely protect data using the fingerprint. (As can be done with the underlying native library.)
Looking at the .m file, it looks like you're storing dummy data, and not exposing it.

I would like to use the user's fingerprint to secure credentials used to authenticate with my server.
If all I have is a yes/no on whether the fingerprint matched, then I can't really secure anything with it.

Enter Password option is not supported

Having "Enter Password" as an option on Touch ID popup that doesn't do anything is making this plugin almost useless in production environment. Is there any chance for this option to be implemented?

Thanks!!

Plugin not recognizing fingerprint change while app is open

Hello everyone.

I'm having an issue with this plugin, which I'm not sure it can be solved.
Here's the thing:

Our corporate App is open, no Fingerprint is configured.
I can logout and login to the App, and it won't ask me to use Touch ID.
Without closing the app, I browse to Touch ID menu, and add a fingerprint.
Then, getting back to my App, it should ask me if I want to use Touch ID on my next login, but it doesn't.
Is it possible for my app to recognize that a fingerpring has been added without having to close it and open again?
Thanks in advance guys!

verifyFingerprint callbacks not called iOS 9.2

Hi,

I've attempted to integrate your plugin but I am having some issues. When I call verifyFingerprint and attempt to use my finger to authenticate neither of the success or error callbacks get called.

If I choose the enter passcode option, this does work however. I think this might be due to an iOS API change because the same issue occurs with two other plugins I have tried (But yours is better suited for my needs).

Would be great if we could find out what has changed and patch it - thanks for your awesome work on the plugin.

Need to customise the error handler popup which occurs on wrong finger scan

Hi,
I am using touch-id plugin #3.2.0, Xcode #8.1 and iOS #10.11.6 . I need to customise the error handler popup which appears when customer using invalid finger print scan which is not saved in the device. Instead of 'Enter Passcode' and 'Cancel' option, can we use other ways to handle the authentication process like password or OTP and if so please explain how ?
Please help.

TouchID Plaug-in behaves different in different environments

Hi Eddy,

I add TouchID and add support for "Passcode". It works good in development mode.
I release my app on TestFlight and the "Passcode" option changes to "Password".
My code is easy:
window.plugins.touchid.isAvailable(
function YesTouchidSupport()
{
window.plugins.touchid.verifyFingerprint(
"TouchID needed for this App",
authencationSuccessful,
authenticationFailed
);
},

    function NoTouchidSupport(errorMessage)
    {
        alert("Device does not support TouchID");
    }
);

I do something wrong?

Thanks,

Hans

hardware detection

how you detect whether the phone hardware supports fingerprint or not ?

Not work in app.run method

This is my app.run code.
when this run it display white screen in my iphone
`app.run(function($ionicPlatform, $rootScope, $http,$window) {

$window.plugins.touchid.isAvailable(function() {
alert('available!');
// success handler: TouchID available
},
function(msg) {
alert('not available, message: ' + msg);
// error handler: no TouchID available
});
});`

i install plugin using npm

isAvailable success function not working

I'm using the latest version of Phonegap and the npm install of your plugin.

    window.plugins.touchid.isAvailable(
	function(){alert('available')}, // success handler: TouchID available
	function(){alert('not available')} // error handler: no TouchID available
); 

The error message works correctly in the browser and on Android, but the success alert isn't firing on my iPhone 6s.

This is my first day working with Phonegap so I have a bit of a curve.

How can I unlock touchID, if I have error "Biometry is locked out"

Hallo @EddyVerbruggen!

I'm followed @ghost / @mabdelwahab / @harshvardhan12 comments:

--

I have used verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel to hide passcode button, but now i have a issue, if user has unsuccessful 5 attempts the touchid get disabled/locked for the device, is there a way to unlock without passcode, so that we can implement within the app

{
  "localizedDescription": "Biometry is locked out.",
  "code": -8
}
Steps
1) window.plugins.touchid.isAvailable
-->onSuccess 
2)window.plugins.touchid.didFingerprintDatabaseChange
-->onSucces 
3)window.plugins.touchid.verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel
(
    'Bitte legen Sie Ihren Finger auf, um sich anzumelden',
    '',   // <------ hide PIN button
    (msg2) => {
        console.log('msg2', msg2);
    },
    errorCallback
);

original comment from #27


possible fix: https://stackoverflow.com/a/45613341

Getting build error in TouchID.m file

/Users/devmobile/Desktop/TouchID/workshop/platforms/ios/Workshop/Plugins/cordova-plugin-touch-id/TouchID.m:49:41: warning:
undeclared selector 'evaluatedPolicyDomainState' [-Wundeclared-selector]
if (![laContext respondsToSelector:@selector(evaluatedPolicyDomainState)]) {
^
/Users/devmobile/Desktop/TouchID/workshop/platforms/ios/Workshop/Plugins/cordova-plugin-touch-id/TouchID.m:54:33: error:
no visible @interface for 'LAContext' declares the selector
'evaluatedPolicyDomainState'
NSData * state = [laContext evaluatedPolicyDomainState];
~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.

** BUILD FAILED **

The following build commands failed:
CompileC build/Workshop.build/Debug-iphonesimulator/Workshop.build/Objects-normal/i386/TouchID.o Workshop/Plugins/cordova-plugin-touch-id/TouchID.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/devmobile/Desktop/TouchID/workshop/platforms/ios/cordova/build-debug.xcconfig,-project,Workshop.xcodeproj,ARCHS=i386,-target,Workshop,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/devmobile/Desktop/TouchID/workshop/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/devmobile/Desktop/TouchID/workshop/platforms/ios/build/sharedpch

Returns null on success

Hello ..
When i used this plugin for touch id in phonegap.. touch id dialog prompt successfully ..
it also shows fail message but not showing success message..?

window.plugins.touchid.isAvailable(
function(msg) {
window.plugins.touchid.verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(
'Scan your fingerprint please', // this will be shown in the native scanner popup
'Enter PIN', // this will become the 'Enter password' button label
function(msg) {
console.log("console "+msg);
$("#touchresponse").html(msg);
alert(typeof msg);

                                                                                                                }, // success handler: fingerprint accepted
                        function(msg) { 
                        $("#touchresponse").html(JSON.stringify(msg));
                        } // error handler with errorcode and localised reason
                        );
                        },    // success handler: TouchID available
                    function(msg) {
                     $("#touchresponse").html(JSON.stringify(msg));
                    } // error handler: no TouchID available
                                                   );

When to call function?

When do I call this function? I'm currently building an app which asks users for user and pass. I would love to add touchid but when should I first ask for fingerprint? After the first login I guess to be able to match fingerprint with credentials?

Does it work with PGB btw?

isAvailable getting null value as response

I am getting an issue in callback function. When I checked in plugin the CDVCommandStatus_OK was returning "1". But, in JS success response I am getting null value.

[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK]
callbackId:command.callbackId];

eg:-
window.plugins.touchid.isAvailable(
function(msg) {alert('ok: ' + msg)}, // msg I am getting Null value
function(msg) {alert('not ok: ' + msg)} // error handler: no TouchID available
);

The plugin suddenly stops working with this error code OSStatus error -25308

When I install from npm using

$ cordova plugin add cordova-plugin-touch-id
$ cordova prepare

It doesn't modify the config.xml file. The following is not added to the config.xml. I hope thats normal...

<feature name="TouchID">
  <param name="ios-package" value="TouchID" />
</feature>

But after a few tries the plugin stops working. And I get this error:

{localizedDescription: "The operation couldn’t be completed. (OSStatus error -25308.)", code: -25308}

iPhoneX FaceID prompt

Hi Eddy!

Have a cordova app which includes v3.2.0 of this plugin.
Upon launching on the new iPhoneX with FaceID, users are prompted with the following:

touchid_faceid_permission

Are there any changes required to "update" the app in order to "officially" support FaceID?

verifyFingerprint: EXC_BAD_ACCESS on OSStatus userPresenceStatus

App is crashing on verifyFingerprint with error message Thread 21: EXC_BAD_ACCESS on the following line:

// Start the query and the fingerprint scan and/or device passcode validation
OSStatus userPresenceStatus = SecItemCopyMatching((__bridge CFDictionaryRef)query, NULL);

isAvailable seems to be working correctly. I received an error message when no fingerprints were enrolled. I enrolled a fingerprint and received the success callback, so I called verifyFingerprint and the debugger stopped on the line above.

I am using:
[email protected]
[email protected]

I have tried removing and reinstalling the plugin to no avail:
meteor remove cordova:cordova-plugin-touch-id
meteor remove-platform ios
meteor add-platform ios
meteor add cordova:[email protected]

Fingerprint or device passcode could not be validated. Status -34018.

Sometimes the popup never comes and shows the following error while deploying it in the device.
Following is the code:
`function iOSFingerPrint() {

        window.plugins.touchid.isAvailable(
                                           function() {
                                           var auth = $base64.encode( $scope.user.username + ":" + $scope.user.password);
                                          ss.set(
                                                  function (key) { console.log('Set ' + key); },
                                                  function (error) { console.log('Error ' + error); },
                                                  'token', auth);
                                           isFingerprintsinPhone = true;
                                           iOSFingerPrintPopUp();
                                           }, // success handler: TouchID available
                                           function(msg) {
                                           isFingerprintsinPhone = false;
                                           iOSFingerPrintPopUp();
                                        
                                           if (isFromIosUserValidation == true) {
                                           $scope.deleteFingerPrint();
                                           isFingerprintsinPhone = false;
                                           }
                                           } // error handler: no TouchID available
                                           );
       
        }
        
        function iOSFingerPrintPopUp() {
        
        if (isFingerprintsinPhone == false) {
        $scope.deleteFingerPrint();
        } else if (isFingerprintsinPhone == true) {
       // alert('It is here');
        window.plugins.touchid.verifyFingerprint(
                                                 'Scan your fingerprint please', // this will be shown in the native scanner popup
                                                 function(msg) {
                                                 $scope.disableFingerPrint=false;
                                                 localStorage.setItem('hasEnrolledFingerprints',true);
                                                 localStorage.setItem('isFingerPrintRequired',true);
                                                 localStorage.setItem('notNullFlag',true);
                                                 $scope.myPopup6.close();
                                                 if (isFromIosUserValidation == true) {
                                                 $scope.showCartStatuspopUp();
                                                 }
                                                 }, // success handler: fingerprint accepted
                                                 function(msg) {
                                
                                                 } // error handler with errorcode and localised reason
                                                 );
        }
        
        }`

build issue for PhoneGap Build

I'm using phonegap build to build the app, since yesterday I got this error for ios build:
Error - The following 3rd-party plugin is causing the build to fail and may need to be updated to a newer version: cordova-plugin-touch-id

cordova-plugin-touch-id | npm | 3.3.1

I'm using
PhoneGap (iOS / Android / Windows)
cli-7.0.1 (4.4.0 / 6.2.3 / 5.0.0)

image
image

Plugin does not load on mobile device ios

when installing the plugin using npm or github

$ cordova plugin add cordova-plugin-touch-id`
$ cordova prepare

or

$ cordova plugin add https://github.com/EddyVerbruggen/cordova-plugin-touch-id
$ cordova prepare

using cordova browser the plugin seems to work, but for mobile device (iPhone 6, iOs 9) the plugin does not seem to load at all.

Thanks,

Fingerprint or device passcode could not be validated. Status -25293.

I accidentally pressed the home button while I was trying to verify my fingerprint and received this error message:
Fingerprint or device passcode could not be validated. Status -25293.

Not sure if this is an issue with the plugin or just a failure of Touch ID. Just wanted to report the finding.

Enter Password

Hi Eddy,

Great Plugin! Was wandering if you plan to also support to enter the password from the Touch ID screen? Or maybe also that it will be possible to disable the "Enter password" function.

Thanks in advance!

TouchID, FaceID background mode

is it also possible to perform touch or face verification in the background ?

meaning, i would like to escape any kind of (native) modal, dialog or overlay.

thanks !

Can't Determine Scanner Existence if No Print Exists

window.plugins.touchid.isAvailable(...) calls the error handler if a device has a TouchID/FaceID scanner, but no fingerprints. This is different from the most popular Android plugin for this purpose. It would be very nice to be able to determine if a device has a TouchID/FaceID scanner in order to provide messaging to encourage the user to add a fingerprint/faceprint.

FaceID works then the device becomes unresponsive

I have a cordova project that uses the latest version (3.3.1) of this plugin and I tested my app on an iPhone X.

My app was originally written to use the TouchID to login users to the app, but since this plugin automatically supports FaceID, it worked without me having to adjust any of my code.

The issue is that the FaceID works perfectly the first time it is used but whenever a user logs out of the app and tries to re-login using the FaceID feature, the entire phone freezes and has to be rebooted.
This issue does not occur on older iPhones supporting TouchID.

I cannot find any error messages when debugging the app. Please advise.

Window.Plugins.touchid is undefined

Hi,

I followed the document for manual process to add touch id, But in the console its throwing
Window.plugins.touchid is undefined...can anyone tell why the error is?

Status -25293 is not coming in iPhone 5s and iPhone 6

Status -25293 code is to identify the tigger point when touchId get invalidated. After this point you will have to enter PIN to validate.
It's a useful but I am not getting this code in iPhone 5s and iPhone 6. It's working in iPhone 6 plus.

Build Failed when adding this plugin

/Plugins/cordova-plugin-touch-id/TouchID.m:54:33:
error: no visible @interface for 'LAContext' declares the selector 'evaluatedPolicyDomainState' NSData * state = [laContext evaluatedPolicyDomainState];
1 warning and 1 error generated.

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.