@insforge/react package provides complete authentication solution for React applications. Use deployed auth pages (built-in auth) or custom UI components—works with Vite.
Quick start
Step 1: Create New React Project (Required)
Step 2: Set Environment Variables
.env
Step 3: Setup Provider
Wrap your app withInsforgeProvider in the root:
src/main.tsx
Step 4: Use Hooks & Components
src/pages/Home.tsx
Next Steps
Hooks
useAuth()
Access authentication state:
isSignedIn- Boolean auth stateisLoaded- Boolean loading state
useUser()
Access current user data:
user- User object with id, email, name, avatarUrlisLoaded- Boolean loading state