This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo AppleAuthentication
A library that provides Sign-in with Apple capability for iOS.
expo-apple-authentication provides Apple authentication for iOS. It does not yet support Android or web.
Any app that includes third-party authentication options must provide Apple authentication as an option to comply with App Store Review guidelines. For more information, see Apple authentication on the Sign In with Apple website.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Configuration in app config
You can configure expo-apple-authentication using its built-in config plugin if you use config plugins in your project (Continuous Native Generation (CNG)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does not use CNG, then you'll need to manually configure the library.
Setup iOS project
To enable the Sign In with Apple capability in your app, set the ios.usesAppleSignIn property to true in your project's app config:
Example app.json with config plugin
Running EAS Build locally will use iOS capabilities signing to enable the required capabilities before building.
Are you using this library in an existing React Native app?
Apps that don't use EAS Build must manually configure the Apple Sign In capability for their bundle identifier.
If you enable the Apple Sign In capability through the Apple Developer Console, then be sure to add the following entitlements in your ios/[app]/[app].entitlements file:
<key>com.apple.developer.applesignin</key> <array> <string>Default</string> </array>
Also, set CFBundleAllowMixedLocalizations to true in your ios/[app]/Info.plist to ensure the sign-in button uses the device locale.
Usage
Development and testing
You can test this library in Expo Go on iOS without following any of the instructions above. However, you'll need to add the config plugin to use this library if you are using EAS Build. When you sign into Expo Go, the identifiers and values you receive will likely be different than what you'll receive in standalone apps.
You can do limited testing of this library on the iOS Simulator. However, not all methods will behave the same as on a device, so we highly recommend testing on a real device when possible while developing.
Verifying the Response from Apple
Apple's response includes a signed JWT with information about the user. To ensure that the response came from Apple, you can cryptographically verify the signature with Apple's public key, which is published at https://appleid.apple.com/auth/keys. This process is not specific to Expo.
API
import * as AppleAuthentication from 'expo-apple-authentication';
No API data file found, sorry!
Error codes
Most of the error codes match the official Apple Authorization errors.