Native module for working with macOS Local Authentication (eg. TouchID)
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')
})
Check if authentication is available
Attempt to authenticate
npm install macos-touchid