@privy-io/react-auth
React client for the Privy Auth API
npm downloads npm version
@privy-io/react-authPaquetes similares:
Tendencia de descargas de npm
3 Años
🌟 Muestra el gráfico de uso en tiempo real en el README.md de @privy-io/react-auth, simplemente copia el código a continuación.
## Usage Trend
[![Usage Trend of @privy-io/react-auth](https://npm-compare.com/img/npm-trend/THREE_YEARS/@privy-io/react-auth.png)](https://npm-compare.com/@privy-io/react-auth#timeRange=THREE_YEARS)
🌟 Muestra el gráfico de tendencia de GitHub Stars en el README.md de @privy-io/react-auth, simplemente copia el código a continuación.
## GitHub Stars Trend
[![GitHub Stars Trend of @privy-io/react-auth](https://npm-compare.com/img/github-trend/@privy-io/react-auth.png)](https://npm-compare.com/@privy-io/react-auth)
Detalle de estadísticas
Paquete
Descargas
Stars
Tamaño
Issues
Publicación
Licencia
@privy-io/react-auth68,604-2.5 MB-hace un díaApache-2.0
README para @privy-io/react-auth

@privy-io/react-auth

pitch-2-slide-2

The Privy React Auth SDK allows you to authenticate your users with Privy in your React app.

Check out our demo!

Changelog

Our changelog contains the latest information about new releases, including features, fixes, and upcoming changes.

We use Semantic Versioning to track changes.

Installing

npm i @privy-io/react-auth

Basic Usage

Setup your integration by wrapping any React components that will use the Privy SDK with the PrivyProvider. This gives your wrapped components access to the Privy SDK and authentication context.

// Import the PrivyProvider
import {PrivyProvider} from '@privy-io/react-auth';

// Wrap any components that will use the Privy SDK with the PrivyProvider – for example, in your `app` or `index` file
<PrivyProvider appId="<your-privy-app-id>">
  <Component {...pageProps} />
</PrivyProvider>;

Now, from within your React components, you can access the Privy SDK via the usePrivy hook!

// Import the usePrivy hook
import {usePrivy} from '@privy-io/react-auth';

// Call usePrivy() from inside your React components
const {ready, authenticated, user, login, logout} = usePrivy();