React Native authentication with the native Touch ID
This is another great day for the React Native community, Naoufal Kadhom is not done yet releasing components.
Warm your fingers.
Touch ID? Got you covered.
react-native-touch-id on GitHub
react-native-touch-id
is a React Native library for authenticating users with Touch ID.
var TouchID = require('react-native-touch-id');
var YourComponent = React.createClass({
_pressHandler() {
TouchID.authenticate(function(error, success) {
if (error) {
// Failure code
} else {
// Success code
}
});
},
render() {
return (
<View>
...
<TouchableHighlight
onPress={this._pressHandler}
/>
<Text>
Authenticate with Touch ID
</Text>
</TouchableHighlight>
</View>
);
}
});