Setup apple login
Privy supports native Apple login when running on iOS. Apple is an OAuth2.0 compliant authentication provider, but requires a specific implementation of Apple sign-in within iOS apps.
Prior to integrating Sign in with Apple, make sure your app’s Bundle ID
rather than the Service ID
, is configured as the Client ID
within the Privy Dashboard.
Installing the Apple Authentication module
You can configure expo-apple-authentication
using its built-in config plugin if you use config plugins.
In your app.json
config file:
- Set the
ios.usesAppleSignIn
property totrue
. - Add
"expo-apple-authentication"
to theplugins
array.
Initializing the login flow
With Privy’s Expo SDK, you can use 'apple'
just as any other OAuth provider.
Refer to our OAuth login guide for more information on login with OAuth providers.
Using the web based flow instead of the native flow
Privy will automatically fallback to the web-based flow on Android devices, where native Apple sign-in isn’t supported.
For the best possible user experience, we recommend using the native “Sign in with Apple” flow as described above. However, if you are unable to use the native flow, or prefer not to, you can use the web based flow instead: