A lightweight React library (v1.0.3) providing reusable authentication hooks and customizable UI components. Designed for React 18+ with a focus on simplicity and extensibility. Offers hooks like useAuth, useLogin, useLogout, and useSignup, plus pre-built AuthForm, AuthProvider, and ProtectedRoute components. Minimal peer dependencies (react, react-dom). Released as npm package with TypeScript support.
npm install auth-control-hooksNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows wrapping app with AuthProvider, using useAuth hook, and conditionally rendering ProtectedRoute.
Wrap top-level component with <AuthProvider> before any components using useAuth.
Ensure login payload matches: { email: string, password: string }.Use <ProtectedRoute redirectTo='/custom-login'> to avoid confusion.
Ensure your component is wrapped in <AuthProvider> high enough in the tree.
Run `npm install auth-control-hooks` and verify import statement: `import { ... } from 'auth-control-hooks'`.Ensure your HTML has a `<div id="root"></div>` and call `createRoot(document.getElementById('root'))`.