Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1820

Compatibility with Cross-Platform Apple Sign-In

      Problem

      I'm attempting to use invertase/react-native-apple-authentication to support Apple Sign-in on a React Native mobile application.

      The setup docs for the above repo show that different Client IDs are used for Android and iOS versions of Apple login. On iOS, the Client ID that gets sent to Realm after successful login is the App ID - for example com.yourdomain.yourapp. On Android, the Client ID that gets sent to Realm is the Service ID we had to generate according to the react-native-apple-authentication docs here, for example com.yourdomain.yourapp-webclient. These must be distinct because Apple won't let you have an App ID and a Service ID with the same identifier.

      Therefore, when you have com.yourdomain.yourapp set as the accepted Client ID in the Apple authentication provider on Realm, Sign in with Apple works on iOS but not Android, and vice versa when you set it to com.yourdomain.yourapp-webclient.

      This means it's impossible to support Apple Sign-In on both iOS and Android simultaneously. It is also impossible to support Apple Sign-In on both iOS and a web application simultaneously.

      Solution

      Add the option for a comma-delimited list of acceptable Client IDs in the Apple authentication provider UI, as you did for aud in Custom JWT, such that any of the Client IDs in the comma-delimited list are accepted by Realm.

      How important is this improvement for you?

      Dealbreaker

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: