1.1.18 โข Published 10 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
10 months ago
1.1.17
10 months ago
1.1.16
10 months ago
1.1.15
10 months ago
1.1.14
10 months ago
1.1.13
10 months ago
1.1.12
10 months ago
1.1.11
10 months ago
1.1.10
10 months ago
1.1.9
10 months ago
1.1.8
10 months ago
1.1.7
10 months ago
1.1.6
10 months ago
1.1.5
10 months ago
1.1.4
10 months ago
1.1.3
10 months ago
1.1.2
10 months ago
1.1.1
10 months ago
1.1.0
10 months ago
1.0.10
10 months ago
1.0.9
10 months ago
1.0.7
10 months ago
1.0.6
10 months ago
1.0.4
11 months ago
1.0.3
11 months ago
1.0.0
11 months ago