React Native Integration
This guide shows you how to integrate Crossmint authentication and wallets into your React Native mobile application using Expo.Demo Repository
Wallets Expo Quickstart
Complete React Native example with Crossmint Auth and Wallets
Prerequisites
- Node.js 18+
- Expo CLI
- A Crossmint API key (Get one here)
Installation
Install the required packages:The React Native SDK uses Expo’s SecureStore for encrypted storage of authentication tokens, providing platform-native secure storage.
Environment Setup
Create a.env file:
Configure Deep Linking
Add deep linking configuration to yourapp.json:
app.json
Implementation
Option 1: With Crossmint Authentication (Recommended)
This approach uses Crossmint’s built-in authentication system.Option 2: Bring Your Own Authentication
If you already have an authentication system, you can skip Crossmint Auth:For complete custom authentication setup, see the Authentication Guide.
Authentication
OAuth Login
Implement OAuth login with multiple providers:Wallet Operations
Get Wallet Balances
Send Tokens
Multi-Chain Support
Create wallets for different chains:Embedded Checkout
Accept credit card payments for tokens and NFTs:See the NFT Checkout Guide for more details on implementing checkout in your app.
Custom Storage Provider
Implement custom storage for authentication tokens:Next Steps
NFT Checkout
Add NFT checkout to your app
Custom Auth
Use your own authentication
API Reference
Explore the full API
Wallet Operations
Learn wallet operations
Troubleshooting
SecureStore errors
SecureStore errors
Make sure you’ve installed
expo-secure-store:Deep linking not working
Deep linking not working
- Verify your
schemeis configured inapp.json - Test deep linking with:
npx uri-scheme open your-app-scheme:// --ios
OAuth redirect issues
OAuth redirect issues
Ensure your redirect URL is configured correctly in the Crossmint Console and matches your app scheme.