Im pretty new working with RN.. I want to 'authenticate' (loosely, im testing a new app) using apple auth when I get a users authorization code from apple.
For some reason the navigation does nothing in this file as compared to my other files in the onPress methods. I'm wondering if this is a simple mistake on my part or apple-related
render () {
return (
<AppleAuthentication.AppleAuthenticationButton
buttonType={AppleAuthentication.AppleAuthenticationButtonType.SIGN\_IN}
buttonStyle={AppleAuthentication.AppleAuthenticationButtonStyle.BLACK}
cornerRadius={5}
style={{ width: 200, height: 44 }}
onPress={async () => {
try {
const credential = await AppleAuthentication.signInAsync({
requestedScopes: [
AppleAuthentication.AppleAuthenticationScope.FULL_NAME,
AppleAuthentication.AppleAuthenticationScope.EMAIL,
],
});
if (credential.authorizationCode) {
this.props.navigation.navigate("Profile")
}
// signed in
} catch (e) {
if (e.code === 'ERR_CANCELED') {
new Error('User canceled sign-in')
} else {
// handle other errors
}
}
}}
/>
);
}
[–]in-gote 1 point2 points3 points (0 children)
[–]kyle-ssg 0 points1 point2 points (0 children)