Skip to content

A full-stack authentication project with login, signup, and signout functionalities, implementing secure user authentication and session management.

Notifications You must be signed in to change notification settings

atishaytripathi/authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Authentication Project

Overview

This project is a full-stack authentication system built with React for the frontend and Node.js with Express for the backend. It includes user registration, login, and protected routes to demonstrate authentication and authorization concepts.

Features

  • User Registration: Users can create an account by providing a username, email, and password.
  • User Login: Registered users can log in using their credentials.
  • JWT Authentication: Secure authentication using JSON Web Tokens (JWT).
  • Protected Routes: Certain routes are accessible only to authenticated users.
  • User Sessions: Maintain user sessions with token-based authentication.
  • Password Encryption: User passwords are securely stored using bcrypt.

Tech Stack

  • Frontend: React, React Router
  • Backend: Node.js, Express, MongoDB (with Mongoose for ORM)
  • Authentication: JSON Web Tokens (JWT), Joi
  • Environment: Node.js, npm, dotenv

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)
  • MongoDB

Installation

  1. Clone the repository:

    git clone [https://github.com/atishaytripathi/authentication.git](https://github.com/atishaytripathi/authentication.git)
    cd authentication
  2. Install backend dependencies:

    cd backend
    npm install
  3. Install frontend dependencies:

    cd ../frontend
    npm install

Running the Application

  1. Start the backend server:

    cd backend
    npm start

    The backend server will run on http://localhost:5000.

  2. Start the frontend development server:

    cd ../frontend
    npm start

    The frontend development server will run on http://localhost:3000.

API Endpoints

  • POST /api/signup: Register a new user
  • POST /api/signin: Login a user

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Contact

For any questions or issues, please contact atishay1922@gmail.com.


Feel free to use and modify this template according to your project's specific needs. Happy coding!

About

A full-stack authentication project with login, signup, and signout functionalities, implementing secure user authentication and session management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published