Skip to content

feat : Create user login route #2

@MahendraDani

Description

@MahendraDani

Description

Existing users should login. Your task is to implement a route to login the existing user. You should sign an access token to the user using JWT

Difficulty

  • Easy
  • 10 Points

API Endpoint

POST http://localhost:3000/auth/login

Controller

/controllers/auth/login.js

Request Body

  • email
  • password

Response

{status : 200,
message : "User logged in successfully",
user : {
  firstName : "Jhon",
  lastName : "Doe",
  email : "jhon@example.com",
  password : "adsfsjkavidfmnasdfjklasdfnmdavkjadsf23123adsf",
  accessToken : "eysadfdsnadvk;dasfjadklj;fkaskdfjanmcdv290294321"
  },  
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Easy10 points reward

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions