Skip to content

This repository showcases a Next.js web app using JWT and MongoDB for authentication. Learn secure user management with modern technologies.

Notifications You must be signed in to change notification settings

abubakar-shaikh-dev/nextjs-authentication

Repository files navigation

Next.js 13 Authentication

Next js Authentication

This repository contains a demonstration of authentication using JSON Web Tokens (JWT) and MongoDB in a Next.js web application with TypeScript.

Table of Contents

Project Details

  • Repository Name: Next.js Authentication
  • Bootstraped with: Next.js version 13

Description

This Next.js web application with TypeScript demonstrates authentication using JSON Web Tokens (JWT) and MongoDB. It emphasizes the importance of configuring environment variables.

Technologies Used

  • Next.js
  • React.js
  • Tailwind CSS
  • TypeScript
  • JSON Web Tokens (JWT)
  • MongoDB

Environment Variables

Create a .env file in the root directory with the following environment variables:

MONGODB_URI=<Your MongoDB connection URI>
SECRET=<Your JWT secret key>

Replace <Your MongoDB connection URI> with your MongoDB database's connection URI and <Your JWT secret key> with a secure key for JWT token operations.

Note: The .env file should not be committed to version control as it may contain sensitive information.

Installation

To set up the project locally, you can use one of the following package managers:

  • Yarn: yarn install
  • npm: npm install
  • pnpm (preferred): pnpm install

Running the Application

After installation, run the Next.js application using this command:

npm run dev

Visit http://localhost:3000 in your browser to see the application in action.

Demo

Explore the live demo of the project: Next.js Authentication Demo

Contact

For inquiries or issues, feel free to contact us at shaikhabubakar2380@gmail.com. I'd love to hear from you!

About

This repository showcases a Next.js web app using JWT and MongoDB for authentication. Learn secure user management with modern technologies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published