A modern authentication starter template for Next.js apps. Get up and running with secure, production-ready auth in under 5 minutes.
- Credentials Login (email & password)
- Google OAuth Login
- GitHub OAuth Login
- Forgot Password
- Two-Factor Authentication (expiry in 5 minutes)
- Change Password
- Email Verification
- Email Change Verification
- Auth.js v5
- Next.js
- TypeScript
- Prisma (PostgreSQL)
- Tailwind CSS
- shadcn/ui
git clone https://github.com/your-username/auth-kit.git
cd auth-kitCopy .env.example to .env and fill in all required values.
cp .env.example .env-
NODE_ENV: Change it to
productionfor deployment or else leave it as it is for development. -
DATABASE_URL
Create a PostgreSQL database (e.g., on Prisma Postgres) and paste the connection string or use the general format ofpostgresql://USER:PASSWORD@HOST:PORT/DATABASE. -
AUTH_SECRET
Generate a strong secret using:npm exec auth secret -
GOOGLE_CLIENT_ID & GOOGLE_CLIENT_SECRET
How to get Google OAuth credentials -
GITHUB_CLIENT_ID & GITHUB_CLIENT_SECRET
How to get GitHub OAuth credentials -
RESEND_API_KEY*
Create an account on Resend and get the API key from there for sending emails
npm installnpx prisma generate --no-enginenpm run devYour authentication starter is ready!
For suggestions or feature requests, raise an issue.
Feel free to fork and start contributing!