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
API Endpoint
POST http://localhost:3000/auth/login
Controller
/controllers/auth/login.js
Request Body
Response
{status : 200,
message : "User logged in successfully",
user : {
firstName : "Jhon",
lastName : "Doe",
email : "jhon@example.com",
password : "adsfsjkavidfmnasdfjklasdfnmdavkjadsf23123adsf",
accessToken : "eysadfdsnadvk;dasfjadklj;fkaskdfjanmcdv290294321"
},
}
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
API Endpoint
POST
http://localhost:3000/auth/loginController
/controllers/auth/login.jsRequest Body
emailpasswordResponse