Appearance
Documentation / react-auth / PrivyProvider
Function: PrivyProvider()
PrivyProvider(
__namedParameters
):Element
Passes the Privy authentication context to your React components.
This should wrap any components that will to use the Privy SDK via the usePrivy hook. As an example:
typescript
// At your application root (e.g. `_app.tsx` in NextJS):
import {PrivyProvider} from '@privy-io/react-auth';
<PrivyProvider appId="APP_ID_FROM_DASHBOARD" onSuccess={() => console.log('Success!')}>
<Component {...pageProps} />
</PrivyProvider>
Parameters
• __namedParameters: PrivyProviderProps
Returns
Element