This project is a simple web application built with Next.js and NextAuth.js for authentication.
Features
- Home Page: Landing page of the application.
- Login Page: Allows users to authenticate via NextAuth.js.
- Register Page: Allows new users to register for the application.
Technologies
- Next.js: React framework for building server-side rendered applications.
- NextAuth.js: Authentication library for Next.js applications.
- Tailwind CSS: Utility-first CSS framework for styling.
Installation
Make sure Node.js is installed on your machine.
Clone the repository:
shellgit clone https://github.com/kimkorngmao/next-auth-app cd next-auth-app
Install dependencies:
shellnpm install
Configure environment variables:
Create a .env
file in the root of your project. Add the following environment variables:
envMONGODB_URI=<you_mongodb_connection_string> NEXTAUTH_SECRET=<you_secret_key>
Start the development server:
shellnpm run dev
Open your browser and visit http://localhost:3000
to see the application running.