Find all missing logic in a Node.js Express /authenticate endpoint.
Unlock detailed company stats for this questionUpgrade
The endpoint takes a username and password, runs a DB query, and uses a bcrypt password hash match to return a 200 or an error. Identify all missing logic (e.g., input validation, proper error handling, appropriate HTTP status codes). The bcrypt compare was initially synchronous and had to be made asynchronous so it would not block the event loop.
Format · Live debugging/optimization exercise.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
