Expo
Learn how to integrate the Para SDK with Expo projects.
Expo is a framework built on React Native that provides many out-of-the-box features, similar to NextJS for web but designed for mobile development. Para provides a @getpara/react-native-wallet
package that works seamlessly in both React Native bare and Expo workflows, utilizing the device’s Native Passkeys for secure wallet management.
Prerequisites
To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration.
Don’t have an API key yet? Request access to the Developer Portal to create API keys, manage billing, teams, and more.
To ensure passkey functionality works correctly:
- Enable biometric or device unlock settings (fingerprint, face unlock, or PIN)
- On Android sign in to a Google account on the device (required for Google Play Services passkey management)
Dependency Installation
Install the required dependencies:
Project Setup
To use the @getpara/react-native-wallet
package in your Expo project, you will need to do some initial project setup.
For passkeys to work correctly we have to setup the Relying Party ID for both iOS and Android. This ensures passkeys are bound to the domains they were created for.
Set Up Associated Domains
Configure your app.json
file to enable passkey functionality and secure communication:
teamId + bundleIdentifier
must be registered with the Para team to set up associated domains. For example, if your Team ID is A1B2C3D4E5
and Bundle Identifier is com.yourdomain.yourapp
, provide A1B2C3D4E5.com.yourdomain.yourapp
to Para. This is required by Apple for passkey security. Allow up to 24 hours for domain propagation. You can find this setting in the Developer Portal under the ‘Configuration’ tab of the API key label as Native Passkey Configuration.Configure your app.json
file to enable passkey functionality and secure communication:
teamId + bundleIdentifier
must be registered with the Para team to set up associated domains. For example, if your Team ID is A1B2C3D4E5
and Bundle Identifier is com.yourdomain.yourapp
, provide A1B2C3D4E5.com.yourdomain.yourapp
to Para. This is required by Apple for passkey security. Allow up to 24 hours for domain propagation. You can find this setting in the Developer Portal under the ‘Configuration’ tab of the API key label as Native Passkey Configuration.For Android setup in Expo, you’ll need to configure your package name and provide your SHA-256 certificate fingerprint.
com.getpara.example.expo
as your package name in app.json
for immediate testing. This package name is pre-registered but only works with the default debug.keystore generated by Expo.Configure your app.json
:
Configure Metro Bundler
Create or update metro.config.js
in your project with the following node module resolutions. This will ensure that any library that depends on global modules like crypto
or buffer
will be properly resolved in the Expo environment.
Import Required Shims
Import the Para Wallet shim in your root layout file to ensure proper global module shimming. This ensures that the necessary modules are available globally in your application. Ensure this is the very first import in your root layout file.
Alternatively, you can create a custom entry point to handle the shimming. This will ensure that the shim occurs before the Expo Router entry point.
Prebuild and Run
Since native modules are required, you’ll need to use Expo Development Build to ensure that linking is successful. This means using the expo prebuild
command to generate the necessary native code and then run your app using expo run:ios
or expo run:android
.
yarn start
, switch to development mode by pressing s
, then i
for iOS or a
for Android.Using the Para SDK
The @getpara/react-native-wallet
provides two main authentication flows: creating a new user and logging in an existing user. Both flows utilize Native Passkeys for secure and seamless authentication.
Setup the Para Client
Initialize Para Client
First, set up the Para client singleton and initialize it in your app:
Then initialize it in your app entry point:
Para offers two hosted environments: Environment.BETA
(alias Environment.DEVELOPMENT
) for testing, and
Environment.PROD
(alias Environment.PRODUCTION
) for live use. Select the environment that matches your current
development phase.
Beta Testing Credentials In the BETA
Environment, you can use any unused email ending in @test.getpara.com
(like
myapp+xyz@test.getpara.com) or US phone numbers (+1) in the format (area code)-555-xxxx
(like (425)-555-1234). Any OTP
code will work for verification with these test credentials. These credentials are for beta testing only. You can
delete test users anytime in the beta developer console to free up user slots.
Create a New User
You have three options to create a new user:
Create a user with Email
Implement User Registration Flow
Create a user with Phone Number
Create a user with OAuth
Login Existing User
This flow demonstrates how to authenticate an existing user using their email and passkey.
Initialize Para Client
Ensure the Para client is set up (if not already done):
Check User Existence and Login
Verify if the user exists and log them in using their passkey:
By following these steps, you can implement a secure and user-friendly authentication system in your Expo application using the Para SDK.
Examples
For practical implementations of the Para SDK in Expo environments, check out our GitHub repository:
Next Steps
After integrating Para, you can explore other features and integrations to enhance your Para experience. Here are some resources to help you get started:
Ecosystems
Learn how to use Para with popular Web3 clients and wallet connectors. We’ll cover integration with key libraries for EVM, Solana, and Cosmos ecosystems.
If you’re ready to go live with your Para integration, make sure to review our go-live checklist:
Troubleshooting
If you encounter issues during the integration or usage of the Para SDK in your Expo application, here are some common problems and their solutions:
For a more comprehensive list of solutions, including Expo-specific issues, visit our troubleshooting guide:
Integration Support
If you’re experiencing issues that aren’t resolved by our troubleshooting resources, please contact our team for assistance. To help us resolve your issue quickly, please include the following information in your request:
1
A detailed description of the problem you’re encountering.
2
Any relevant error messages or logs.
3
Steps to reproduce the issue.
4
Details about your system or environment (e.g., device, operating system, software version).
Providing this information will enable our team to address your concerns more efficiently.