expo-apple-authentication
Version: 55.0.6 Provides ‘Sign in with Apple’ capability for Expo and React Native apps. Allows users to authenticate using their Apple ID with Face ID or Touch ID on iOS 13+.Installation
Usage
API Reference
Methods
() => Promise<boolean>
Checks if Sign in with Apple is availableReturns
true on iOS 13+ devices, false otherwise(options: AppleAuthenticationSignInOptions) => Promise<AppleAuthenticationCredential>
Initiates Sign in with Apple flowOpens native authentication dialog
(options: AppleAuthenticationRefreshOptions) => Promise<AppleAuthenticationCredential>
Refreshes user credentials
(options: AppleAuthenticationSignOutOptions) => Promise<void>
Signs out the user
(user: string) => Promise<AppleAuthenticationCredentialState>
Checks credential state for a userReturns one of:
AUTHORIZED, REVOKED, NOT_FOUND, TRANSFERREDComponents
component
Native Apple Sign In button componentProps:
buttonType: Button type (SIGN_IN, SIGN_UP, CONTINUE)buttonStyle: Visual style (WHITE, WHITE_OUTLINE, BLACK)cornerRadius: Corner radius in pixelsonPress: Callback when button is pressed
Types
AppleAuthenticationCredential
string
Unique user identifier
string | null
User’s email (only on first sign-in)
AppleAuthenticationFullName | null
User’s full name (only on first sign-in)
AppleAuthenticationUserDetectionStatus
Indicates if user appears to be real person
string | null
JWT identity token
string | null
Authorization code
string | null
State value from request
AppleAuthenticationFullName
string | null
First name
string | null
Last name
string | null
Middle name
string | null
Name prefix (e.g., “Dr.”)
string | null
Name suffix (e.g., “Jr.”)
string | null
Nickname
Enums
Examples
Basic Sign In
Check Availability
Verify Credential State
Complete Auth Example
Platform Support
Sign in with Apple is only available on iOS 13 and later. Always check availability before showing the button.
Configuration
app.json
Apple Developer Account
- Enable “Sign in with Apple” capability in your app identifier
- Create a service ID for web authentication (if needed)
- Configure domains and redirect URLs
Best Practices
- Check Availability: Always check
isAvailableAsync()before showing button - First Sign-In: Email and name are only provided on first sign-in, store them
- Verify Server-Side: Send
identityTokento backend for verification - Credential State: Check credential state on app launch
- Handle Revocation: Monitor for
REVOKEDstate and sign user out