macos-touchid
Native module for working with macOS Local Authentication (eg. TouchID)
Last updated a year ago by emilbayes .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install macos-touchid 
SYNC missed versions from official npm registry.

macos-touchid

Build Status

Native module for working with macOS Local Authentication (eg. TouchID)

Usage

var touchid = require('macos-touchid')

if (touchid.canAuthenticate() === false) {
  throw new Error('No authentication method available')
}

touchid.authenticate('authenticate you', function (err, didAuthenticate) {
  if (err) throw err

  console.log(didAuthenticate ? `You're in!` : 'You will be terminated')
})

API

const bool = touchid.canAuthenticate()

Check if authentication is available

touchid.authenticate(reason, cb(err, bool))

Attempt to authenticate

Install

npm install macos-touchid

License

ISC

Current Tags

  • 1.0.3                                ...           latest (a year ago)

2 Versions

  • 1.0.3                                ...           a year ago
  • 1.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |