Use Privy to add authentication and embedded wallets to a Next.js + React app.Documentation Index
Fetch the complete documentation index at: https://pond.dflow.net/llms.txt
Use this file to discover all available pages before exploring further.
Privy supports multiple authentication methods (email, socials, passkeys, and
external wallets). This guide uses email OTP as a simple starting point.
Prerequisites
Create a Privy app in the Privy Dashboard and copy your App ID.Step-by-step (Next.js + React)
Install the React SDK
Install the React SDK.
Install dependencies
Install dependencies
Wrap your app with PrivyProvider
Put your App ID in
appId="your-app-id" and wrap your app root. For Solana
embedded wallets, set embeddedWallets.solana.createOnLogin to create
wallets on login.- App Router
- Pages Router
Create a client-side provider component, then wrap it in
app/layout.tsx.app/providers.tsx
app/providers.tsx
app/layout.tsx
app/layout.tsx
To use external Solana wallets, pass
toSolanaWalletConnectors() to
externalWallets. See
configuring connector chains.See the
Privy Solana wallet docs
for transaction examples.
Let’s stay in touch
Dev Notifications
Join the DFlow Dev Notifications Telegram group to stay in the loop on
new features and other announcements.