To use embedded wallets in your React Native app, you must first connect your mobile application with your website so users can use passkeys in both your app and website.The setup process involves installing a few React Native packages and setting up your domain’s .well-known public endpoint.
Install the required package using your preferred package manager:
Shell
Copy
Ask AI
npx expo install react-native-passkey@2.1.1
After installing the react-native-passkey package, you need to link the native packages to your project by running the following commands:For iOS, run:
Copy
Ask AI
cd ios && pod install
If you are using Expo, you may need to run a prebuild or create a new build:
Copy
Ask AI
expo prebuild
Or use the EAS service to create a new build for your app
There are iOS-specific steps to configure Passkey support. If you have already set up an associated domain for your application, you can skip this step.
Follow the Apple documentation to associate a domain with your application. On your webserver, set up this route:
Copy
Ask AI
GET https://\{\{yourdomain\}\}/.well-known/apple-app-site-association
This route should serve a static JSON object containing your team ID and bundle identifier. Example (replace XXXXXXXXXX with your team identifier and “YYY.YYYYY.YYYYYYYYYYYYYY” with your bundle ID, e.g., H123456789.com.example.mobileApp):
In Xcode, under Signing & Capabilities, add a new Capability of type Associated Domains. Now add this and replace XXXXXX with your domain (e.g., apple.com):
Copy
Ask AI
webcredentials:XXXXXX
If you are using Expo, add the webcredentials:{{yourdomain}} to your app.json file. See the Expo documentation for more details.
Follow the Android documentation to associate a domain with your application. On your webserver, set up this route:
Copy
Ask AI
GET https://\{\{yourdomain\}\}/.well-known/assetlinks.json
This route should serve a static JSON object containing the following information (replace with your data, and replace SHA_HEX_VALUE with the SHA256 fingerprints of your Android signing certificate):