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
@alpha 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
@alpha 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.
Your apps must be registered with Para to link the passkey to the correct domain. You can find this configuration options your Developer Portal under the ‘Configuration’ tab of the API key label as Native Passkey Configuration.
Platform-Specific 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.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
@alpha provides two main authentication methods: email-based and phone-based. Both flows utilize Native Passkeys for secure and seamless authentication.
On mobile Para doesn’t provide a modal component. Instead you can create your own auth screens with either email, phone number, or oauth using the available methods in the Para SDK.
Setup the 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 email ending in @test.getpara.com
(like
dev@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.
Authentication Methods
Create a User with Email
Implement a user registration flow with email verification:
Login with Email
Authenticate an existing user with their email:
Create a Wallet After Authentication
After the user has successfully authenticated, you can create their wallet:
Create a User with Email
Implement a user registration flow with email verification:
Login with Email
Authenticate an existing user with their email:
Create a Wallet After Authentication
After the user has successfully authenticated, you can create their wallet:
Create a User with Phone Number
Implement a user registration flow with phone verification:
Login with Phone
Authenticate an existing user with their phone number:
Create a Wallet After Authentication
After the user has successfully authenticated, you can create their wallet:
Create a User with OAuth
OAuth authentication flow is coming soon. Please contact Para support for more information and early access.
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:
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:
Next Steps
After integrating Para, you can explore other features and integrations to enhance your Para experience.