Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async authenticate() {
const authenticated = await LocalAuthentication.authenticateAsync({
promptMessage: "Authentication message"
});
if (authenticated.success) {
this.setState({
authenticationError: "None"
});
} else {
this.setState({
authenticationError: authenticated.error
});
}
this.setState({
authenticated: authenticated.success
});