macos-touchid

1.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i macos-touchid

Weekly Downloads

20

Version

1.0.3

License

ISC

Unpacked Size

40.6 kB

Total Files

10

Last publish

Collaborators

  • emilbayes