invertase / react-native-apple-authentication

A React Native library providing support for Apple Authentication on iOS and Android.
Other
1.42k stars 223 forks source link

[TypeError: undefined is not an object (evaluating '_reactNativeAppleAuthentication.appleAuthAndroid.ResponseType.ALL')] #326

Closed RuzenDev closed 1 year ago

RuzenDev commented 1 year ago

Hey , Thank you very much for your wonderful library.

Target

Apple ID login in Android devices.

Problem

  appleAuthAndroid.configure({
      clientId: "from our app",
      redirectUri:
        "already setup",
      responseType: appleAuthAndroid.ResponseType.ALL,
      scope: appleAuthAndroid.Scope.ALL,
      nonce: rawNonce,
      state

 I get the error mentioned in the title with above setup. 

What I have done to understand

I tried to check if appleAuthAndroid is working fine by logging appleAuthAndroid.isSupported . It gave me undefined!
Looking at docs, it seems the device has to be of level > =19. My platform version is 33. But still I have the issue.

Can anyone please help me.?

Your help is highly appreciated.
bzliu94 commented 6 months ago

I had the same issue with appleAuthAndroid.isSupported; turns out you have to build the project once over because the package has some Gradle build tasks that help Java source. (I have been attempting to use the library on Android and I have Android emulator version of 34, which is more recent than 19, so figured there is something else going on.)