How to Create Auth0 User from 'Sign in with Apple' Identity Token (React Native)


I have an existing iOS app created with React Native. It uses custom sign up and login forms to let users sign up and log in, and uses the ‘react-native-auth0’ package, specifically functions auth0.auth.createUser to sign up and auth0.auth.passwordRealm to log in. This works successfully.

Now, I want to add the ‘Sign in with Apple’ option. As far as I can tell, I have done the necessary setup in both the Auth0 control panel and the Apple Developer control panel. I have also enabled ‘Sign in with Apple’ in Xcode, and I have added the third-party ‘invertase/react-native-apple-authentication’ package.

So far so good:

  1. If I run Auth0’s ‘Sign in with Apple’ test in the browser, it’s successful.

  2. If I click the ‘Sign in with Apple’ button in my iOS app, I see the Apple popup, and after that I get a successful response from Apple, containing an email address, name, and identity token (amongst other things).

My question is, what do I need next? I think I need to pass this identity token to Auth0 so that it can communicate with Apple and create a user inside Auth0, but I can’t see this last step on any of the documentation (at least, not for React Native). Does anyone know which function needs to be called, or failing that, which endpoint I need to call and what I need to pass it?

Thanks very much in advance.