Skip to content

Next.js Auth Starter Kit: A complete authentication solution with credentials, OAuth (Google, GitHub), email verification, and 2FA, built with Auth.js, Prisma, and a mobile-first UI using Tailwind CSS and shadcn/ui.

License

Notifications You must be signed in to change notification settings

Dendro-X0/next-authjs-starterkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js Auth Starter Kit

CI

Deploy with Vercel

Introduction

Next.js Auth Starter Kit is a batteries‑included authentication template for modern web apps. It ships with credentials and OAuth (Google, GitHub), email verification, secure password reset, and optional 2FA — all wired end‑to‑end with Auth.js v5 and Prisma. The UI is mobile‑first and accessible by default using Tailwind CSS and shadcn/ui, so you can focus on product instead of plumbing.

✨ Features

  • Credentials-Based Authentication: Secure login with email or username + password.
  • Social Logins: Integrated with Google and GitHub for easy sign-in.
  • Email Verification: Ensure users have a valid email address.
  • Password Reset: Secure flow for users to reset their password.
  • Two-Factor Authentication (2FA): Add an extra layer of security with TOTP.
  • User Profile Management: Users can view and update their personal information.
  • Avatar Uploads: Local file uploads for profile pictures, powered by Vercel Blob.
  • Account Settings: Manage security, notifications, and privacy settings.
  • Secure Server Actions: All authentication and user management logic is handled securely on the server.
  • Validation: End-to-end type-safe validation with Zod.
  • Magic Links: Passwordless sign-in via verified email links.
  • Mobile-First & A11y-Ready UI: Landmarks, skip links, live regions, and keyboard-accessible components out of the box.

Quick Start

pnpm install
cp .env.example .env
pnpm prisma migrate dev
pnpm dev

Open http://localhost:3000 in your browser. For full setup, see docs/getting-started.md and docs/configuration.md.

Note: A unique optional username field was added to prisma/schema.prisma to support username login. Ensure you run pnpm prisma migrate dev after pulling changes to update your database.

Documentation

Topic-focused guides live in docs/:

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Next.js Auth Starter Kit: A complete authentication solution with credentials, OAuth (Google, GitHub), email verification, and 2FA, built with Auth.js, Prisma, and a mobile-first UI using Tailwind CSS and shadcn/ui.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published