Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onlyAuthorize = async () => {
try {
const authResult = await onlyAuthorize(config);
this.animateState(
{
authResult,
tokenResult: null
},
500
);
this.setState({
authResult,
tokenResult: null
});
} catch (error) {
Alert.alert('Failed to authorize', error.message);
}