This project is a simple web application built with Next.js and NextAuth.js for authentication.
- 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.
- 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.
Make sure Node.js is installed on your machine.
-
Clone the repository:
git clone https://github.com/kimkorngmao/next-auth-app cd next-auth-app
-
Install dependencies:
npm install
-
Configure environment variables:
Create a
.env
file in the root of your project. Add the following environment variables:MONGODB_URI=<you_mongodb_connection_string> NEXTAUTH_SECRET=<you_secret_key>
-
Start the development server:
npm run dev
-
Open your browser and visit
http://localhost:3000
to see the application running.