A simple Next.js project demonstrating user authentication with NextAuth.js, custom API routes, and protected pages. Built using Next.js Pages Router.
- User sign-up and login with email & password
- Password hashing for secure storage
- NextAuth.js integration for session management
- API routes for authentication and user operations
- Protected pages accessible only to authenticated users
- Session handling with JWT strategy
- Client-side and server-side authentication checks
- Clone the repository
git clone https://github.com/yuriiforge/NextJS-NextAuth- Install dependencies:
npm install-
Copy content of .env.example file into .env.local. Place your own values
-
Start the development server
npm run dev