Auth Service with JWT Backend

Welcome to the Auth Service with JWT Backend project! This Node.js project is a sample implementation of an authentication service using JSON Web Tokens (JWT). It's designed to be used as part of a job interview process.

Project Overview

The Auth Service with JWT Backend project provides a secure authentication mechanism using JWTs. It's a great demonstration of building authentication features in a Node.js application. Do not remove local node_modules.

Installation

To run the Auth Service with JWT Backend project, follow these steps:

  1. Set up your environment variables (e.g., database connection details, JWT secret) in a .env file based on the provided .env.example.

  2. Run the application:

    npm start

Instructions for the Job Candidate

As a job candidate, your task is to enhance the Auth Service by adding a feature that checks if the current user is signed in or not. Follow the steps below to complete this task:

  1. Before making any modifications, ensure that the project is running successfully.

  2. Locate the file or files responsible for handling user authentication.

  3. Identify the appropriate functions or middleware that handle user sign-in or authentication status.

  4. Implement a feature that checks if the current user is signed in or not. You may choose to add an API endpoint, middleware, or modify existing authentication functions.

  5. After making changes, run the project again to ensure that the project remains functional without any issues.

  6. Optionally, document any changes made and reasons for those changes.

Good luck with your interview! If you have any questions, don't hesitate to reach out.

Happy coding!