Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Authentication Button doesn't show up using expo-apple-authentication package

I'm trying to implement Apple Sign In in my iOS app using the expo-apple-authentication package, but I'm not being able to make the button show up. Even though I'm using the exact same code as the documentation:

 <AppleAuthentication.AppleAuthenticationButton
   buttonType={
     AppleAuthentication.AppleAuthenticationButtonType.SIGN_IN
   }
   buttonStyle={
     AppleAuthentication.AppleAuthenticationButtonStyle.BLACK
   }
   cornerRadius={5}
   onPress={() => {
   }}
 />

It's worth noticing that the call to AppleAuthentication.isAvailableAsync() returns true.

I'm testing it in a Simulator. Is it not supposed to work in a dev environment? how am I supposed to test it then?

like image 524
cuttlas Avatar asked Sep 15 '25 09:09

cuttlas


1 Answers

For some odd reason the button does not have a default size. Applying your own style fixes it.

<AppleAuthentication.AppleAuthenticationButton
  onPress={onSignIn}
  buttonType={AppleAuthentication.AppleAuthenticationButtonType.SIGN_IN}
  buttonStyle={AppleAuthentication.AppleAuthenticationButtonStyle.BLACK}
  style={{ width: 200, height: 64 }} // You must choose default size
/>
like image 173
GentryRiggen Avatar answered Sep 18 '25 10:09

GentryRiggen