1.1.18 โข Published 6 months ago
@inertiapixel/react-auth v1.1.18
InertiaPixel React/NextJs Auth Library
react-auth
Authentication library for React and Next.js. Supports credential and social login, JWT token handling, and context-based auth state โ built for scalable, multi-project use.
๐ Installation
Install the package via npm:
npm install @inertiapixel/react-auth๐ Features
- โ
Easy setup with
AuthProvider - ๐ JWT-based authentication
- ๐ Supports:
- Credentials login (email + password)
- Social logins (Google, Facebook) -->
- ๐ง Context-driven auth state
- ๐ฆ Built-in utilities like
useAuth,Protect,SignedIn,SignedOut - ๐งช Type-safe API (written in TypeScript)
- โ๏ธ Plug-and-play for scalable projects
๐ ๏ธ Basic Usage
1. Wrap your App with AuthProvider
// pages/_app.tsx
import { AuthProvider, SignedIn, SignedOut } from '@inertiapixel/react-auth'
import type { AppProps } from 'next/app'
export default function MyApp({ Component, pageProps }: AppProps) {
return (
<AuthProvider config={{ tokenKey: 'token', redirectTo: '/' }}>
<SignedIn>
<Component {...pageProps} />
</SignedIn>
<SignedOut>
<p>Please sign in</p>
</SignedOut>
</AuthProvider>
)
}Authors
- Md Asif - LinkedIn
Website
๐ www.inertiapixel.com/
License
This icon set is free and open-source under the MIT License.
See the full license here.
Crafted in India by InertiaPixel
1.1.18
6 months ago
1.1.17
6 months ago
1.1.16
6 months ago
1.1.15
6 months ago
1.1.14
6 months ago
1.1.13
6 months ago
1.1.12
6 months ago
1.1.11
6 months ago
1.1.10
6 months ago
1.1.9
6 months ago
1.1.8
6 months ago
1.1.7
6 months ago
1.1.6
6 months ago
1.1.5
6 months ago
1.1.4
6 months ago
1.1.3
6 months ago
1.1.2
6 months ago
1.1.1
6 months ago
1.1.0
6 months ago
1.0.10
6 months ago
1.0.9
6 months ago
1.0.7
6 months ago
1.0.6
6 months ago
1.0.4
6 months ago
1.0.3
6 months ago
1.0.0
6 months ago