Description
In backend/controllers/authController.js (line 7), cookie-parser is imported but never used:
const cookieParser = require('cookie-parser');
The JWT token is sent in the response body as { token } but no httpOnly cookie is set. The cookie setup code appears incomplete.
Suggested Fix
Remove the unused cookieParser import, or implement the cookie-setting logic if it was originally intended for secure token delivery.
Description
In
backend/controllers/authController.js(line 7),cookie-parseris imported but never used:The JWT token is sent in the response body as
{ token }but no httpOnly cookie is set. The cookie setup code appears incomplete.Suggested Fix
Remove the unused
cookieParserimport, or implement the cookie-setting logic if it was originally intended for secure token delivery.