DefinitelyTyped/types/react-native-touch-id/react-native-touch-id-tests.ts
Jin Shin 7f9d41cfbb @types/react-native-touch-id: Updated the module to version 4.0.2, adding new config option (#27007)
* Updated the module to version 4.0.2

* Updated Contributor name

* Fix header
2018-07-12 10:03:53 -07:00

12 lines
453 B
TypeScript

import { isSupported, authenticate, TouchIDError } from 'react-native-touch-id';
isSupported().then((isOk: boolean) => {}).catch((error: TouchIDError) => {});
authenticate('reason').then((isOk: boolean) => {}).catch((error: TouchIDError) => {});
authenticate('reason', {
title: 'Authentication Required',
color: '#1306ff',
fallbackTitle: 'Fallback Authentication Method'
}).then((isOk: boolean) => {}).catch((error: TouchIDError) => {});