React SDK
React SDK
Hooks, components, and HOCs for adding authentication to React applications.
The @zautha/react package provides everything you need to add authentication to a React application:
- Provider —
ZauthaProvidercontext that manages auth state - Hooks —
useAuth,useUserfor accessing auth state - Components —
SignIn,SignUp,UserButtonpre-built UI - HOC —
withAuthfor protecting routes
Installation
npm install @zautha/sdk @zautha/reactPackages
| Package | Description |
|---|---|
@zautha/sdk | Core JavaScript/TypeScript SDK (framework-agnostic) |
@zautha/react | React hooks and pre-built components |
The React SDK depends on @zautha/sdk — install both.