Overview
This guide shows how to add user wallets to your existing React app with just a few lines of code. Users sign in with email, SMS, or social login and get a self-custodial wallet instantly, with no seed phrases required.Already have user authentication? If you’re using Auth0, Firebase, AWS Cognito, or another identity provider, check out Custom Authentication to integrate with your existing auth system.
Integrate into your app
Continue reading to add user wallets to your current React app with a few lines of code.
Check out our template app
Build a complete demo app from scratch to learn all the features.
Prerequisites
- A free CDP Portal account and project
- Node.js 22+
- A node package manager installed (i.e.,
npm,pnpm, oryarn) - Basic familiarity with React and TypeScript
- Configured your domain in CDP Portal (see below)
How to configure your domain in CDP Portal
How to configure your domain in CDP Portal
Step 1: Access CDP PortalNavigate to the Security Configuration in CDP Portal, and click Add domain to include your local app.
Step 2: Add your domain
Step 3: Save your changesClick Add domain again to save your changes.
You should see your domain listed in the CDP Portal dashboard. The allowlist will take effect immediately upon saving.

- For local development: Use
http://localhost:3000(or your preferred port) - For production: Use your actual domain (e.g.,
https://yourapp.com)


1. Install packages
Once you’ve completed the prerequisites above, install the required packages:2. Wrap your app with the provider
Add the CDP provider to your root component (typicallyApp.tsx or main.tsx). Replace "your-project-id" with your actual project ID from CDP Portal.
3. Add authentication
Option A: Use the AuthButton (recommended)
The simplest approach is theAuthButton component, which handles the entire authentication flow:
Option B: Build custom auth UI
For custom UIs, use the authentication hooks directly:4. Send transactions
EVM
Once authenticated, users automatically get a wallet address. Here’s how to send EVM transactions:Solana
What to read next
Demo app tutorial
Build a complete demo app to learn all features in depth
React Hooks
Explore all available hooks for advanced functionality
React Components
Use pre-built components for faster development
Authentication Methods
Email OTP, SMS, social login, and custom auth options