To see an example application that has the Privy Expo SDK configured with passkeys, check out our Expo starter repo!

0. Ensure you have configured a custom build configuration

If you have not already configured a custom build configuration, follow the custom build configuration guide.

1. Install additional peer dependencies

npx expo install react-native-passkeys

2. Update native app settings

Passkeys require that you associate a website with your app. To do so, you need to have the associated domain file on your website and the appropriate entitlement in your app.

1. Apple App Site Association

  • Create a JSON file with at least the following content
{
  "webcredentials": {
    "apps": ["<teamID>.<bundleID>"]
  }
}
  • Make the file accessible on your website at the following path
https://<your_domain>/.well-known/apple-app-site-association

Make sure to use your teamID and bundleID in the file hosted on your website.

For more information about supporting associated domains see Apple’s documentation.

2. App configuration

Next, update your app.json (or app.config.ts) to include the associatedDomains and deploymentTarget like so:

{
  "expo": {
    "ios": {
      "associatedDomains": ["webcredentials:<your_domain>"]
    }
    "plugins": [
      [
        "expo-build-properties",
        {
          "ios": {
            "deploymentTarget": "17.5"
          }
        }
      ]
    ]
  }
}

3. Build

Lastly, build your app!

npx expo prebuild -p ios
npx expo run:ios