This Next.js project was bootstrapped with create-next-app
.
This course provides a comprehensive guide to implementing authentication in your applications using Auth.js v5. The course covers various aspects, including setting up Next.js with MongoDB, integrating Google Sign-In, and more.
- Node.js
- npm or yarn
- MongoDB
-
Clone the repository:
git clone https://github.com/arsath-eng/Auth-Testing.git
-
Navigate to the project directory:
cd auth-project
-
Install dependencies:
npm install
or
yarn install
-
Configuration: Create a
.env
file in the root directory and add the necessary environment variables:MONGO_URI='mongodb+srv:...........' AUTH_SECRET='..........' GITHUB_CLIENT_ID='............' GITHUB_CLIENT_SECRET='................' GOOGLE_CLIENT_ID='................' GOOGLE_CLIENT_SECRET='...............'
AUTH-PROJECT/
├── .next/
├── action/
├── app/
├── components/
├── lib/
│ ├── db.ts
│ ├── getSession.ts
│ └── utils.ts
├── models/
│ └── User.ts
├── node_modules/
├── public/
├── .env
├── .eslintrc.json
├── .gitignore
├── auth.ts
├── components.json
├── middleware.ts
├── next-env.d.ts
├── next.config.mjs
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── README.md
├── tailwind.config.ts
└── tsconfig.json
- Start the development server:
or
npm run dev
yarn dev