Get started
- About Privy
- Create an account
- Choose your platform
- Configuring Privy Dashboard
Get started by SDK
- React
- Installation
- Setup
- Quickstart
- Advanced
- React native
- Swift
- Android
- Flutter
- Unity
- NodeJS
- REST API
Changelogs
- SDK changelogs
Troubleshooting and tips
- React
- Using LLMs
React
Installation
Requirements
- React 18 or higher
- TypeScript 5 or higher
Installation
Install the Privy React SDK using your package manager of choice:
npm install @privy-io/react-auth@latest
If your app uses yarn
, you must either manually also install @solana/web3.js
and @solana/spl-token
or add them to webpack’s externals
config if your app does not use Solana:
// webpack.config.js
module.exports = {
//...
externals: {
['@solana/web3.js']: 'commonjs @solana/web3.js',
['@solana/spl-token']: 'commonjs @solana/spl-token'
}
};
// next.config.js
module.exports = {
webpack: (config) => {
// ...
config.externals['@solana/web3.js'] = 'commonjs @solana/web3.js';
config.externals['@solana/spl-token'] = 'commonjs @solana/spl-token';
return config;
}
};
On this page
Assistant
Responses are generated using AI and may contain mistakes.