A simple, ready-to-use authentication starter kit for Next.js applications with multiple auth providers.
- 🔐 Multiple Auth Providers: Google, GitHub, Facebook, Plex, and email/password
- 🔄 Modern Stack: Next.js 15.3, React 19, Tailwind CSS 4
- 🧩 Clean UI: Built with shadcn/ui components
- 📱 Responsive Design: Works on all devices
- 🌐 Easy Integration: Simple setup with environment variables
-
Clone and install
git clone https://github.com/gitlocaluser/react-saas-auth-starter.git cd react-saas-auth-starter pnpm install -
Set up environment variables
cp .env.example .env.local
Edit
.env.localand add your auth provider credentials. -
Run the development server
pnpm dev
-
Visit
http://localhost:3000to see your auth system in action!
- Create project at Google Cloud Console
- Set up OAuth credentials with redirect URI:
http://localhost:3000/api/auth/callback/google
- Register a new OAuth app at GitHub Developer Settings
- Add callback URL:
http://localhost:3000/api/auth/callback/github
- Create app at Facebook Developers
- Add OAuth redirect URI:
http://localhost:3000/api/auth/callback/facebook
- Add a unique client ID to your environment variables
- Auth is handled automatically by the built-in PIN-based flow
/app # Next.js app router pages
/api/auth # NextAuth API routes
/auth # Auth success page
/login # Login page
/components # React components
/ui # UI components from shadcn/ui
/lib # Utilities and helpers
- This starter uses NextAuth.js for authentication
- UI components are from shadcn/ui
- Styled with Tailwind CSS
MIT