Skip to main content

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, TRANSFERRED

Components

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 pixels
  • onPress: 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

  1. Enable “Sign in with Apple” capability in your app identifier
  2. Create a service ID for web authentication (if needed)
  3. Configure domains and redirect URLs

Best Practices

  1. Check Availability: Always check isAvailableAsync() before showing button
  2. First Sign-In: Email and name are only provided on first sign-in, store them
  3. Verify Server-Side: Send identityToken to backend for verification
  4. Credential State: Check credential state on app launch
  5. Handle Revocation: Monitor for REVOKED state and sign user out
User email and full name are only provided during the first sign-in. Store this information as it won’t be provided again.

App Store Requirements

If your app uses third-party sign-in (Google, Facebook, etc.), Apple requires you to also offer Sign in with Apple as an option.

Resources