☑Kizspy.me
quantity: 2
_id: ObjectId('67c0558d8fe986d0086caa32')
▼ 1: Object
bookId: ObjectId('67c01dba8fe986d0086caa17')
quantity: 2
id: ObjectId('67c0558d8fe986d0086caa33')
borrowDate: 2025-02-27T12:07:41.499+00:00
_V: @
Question 5 (1 point) - Authentication with JWT
Description: Develop an API to allow user login and protect certain endpoints using JWT
authentication.
API Details:
1. Login API
URI:
http://localhost:9999/api/users/login
Method: POST
Zoom
Input: JSON containing email and password.
Output: Returns a JWT token if credentials are valid
(payload={id:user._id); JWT_SECRET read from .env; expiresin: '1h')
Campia Innut. In the tact data in CamalaTact lean in the alan faldne
+ 80%
Close