Code Monkey home page Code Monkey logo

Comments (5)

EddyVerbruggen avatar EddyVerbruggen commented on May 28, 2024

Hi @ikosta thanks of this very useful issue and those links you provided!

So as I understand it you can programmatically check whether or not the list of enrolled fingerprints changed since the last time you authenticated and then the developer can decide if he wants to have the user re-authenticate himself (which seems like a smart thing to do at that point).

I don't want to sit on the developer's chair and just check this every time the user scans his fingerprint as I'd have to invoke the errorhandler and most devs probably assume the user made a mistake.

I'd rather make this more explicit and add a new method to the API where the developer can choose to (and is encouraged to) check whether or not the list of enrolled fingerprints changed since the last time this function was called, and if so the dev should have the user re-authenticate himself before he can use his fingerprint(s) again.

That's likely the best balance between secutiry, devs not breaking app experiences, and me not getting overwhelmed with false bugreports.

So recommended usage of this plugin will then change from this:

window.plugins.touchid.isAvailable(
  function(available) {
    if (available) {
      // call the fingerprint scanner
    }
  }
);

To this:

window.plugins.touchid.isAvailable(
  function(available) {
    if (available) {
      window.plugins.touchid.didFingerprintDatabaseChange(
        function(changed) {
          if (changed) {
            // re-auth the user by asking for his credentials before allowing a fingerprint scan again
          } else {
            // call the fingerprint scanner
          }
        }
      );
    }
  }
);

Does that make sense? :)

from cordova-plugin-touch-id.

ikosta avatar ikosta commented on May 28, 2024

Hi Eddy,

that would be perfect and will be the best solution.

Thanks for all your plugins and the maintenance!

from cordova-plugin-touch-id.

EddyVerbruggen avatar EddyVerbruggen commented on May 28, 2024

Hey @ikosta thanks for the help on this. Check the readme for details on the new feature and please give it a spin. use the master branch as it's not released to npm yet.

from cordova-plugin-touch-id.

ikosta avatar ikosta commented on May 28, 2024

I'll implement it and give you feedback. Thanks!

from cordova-plugin-touch-id.

EddyVerbruggen avatar EddyVerbruggen commented on May 28, 2024

Closing for now, please reopen if anything pops up.

from cordova-plugin-touch-id.

Related Issues (20)

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.