As a backend developer,
I want to enforce validation checks on incoming requests to the authentication routes (register and login),
So that we ensure all necessary fields (email and password) are included in the request body, improving security and preventing errors.
Acceptance Criteria
When a POST request is made to the register route, the backend should check if the request body contains both email and password fields.
If either the email or password field is missing from the request body, the backend should respond with an appropriate error message and status code.
Similarly, when a POST request is made to the login route, the backend should validate the presence of both email and password fields in the request body.
The error responses should provide clear and informative messages guiding users on the required fields.
Testing
Attempting to sign up without an email or password results in a 400 error being thrown
Signing up and logging in with email and password continue to work
Description
As a backend developer, I want to enforce validation checks on incoming requests to the authentication routes (register and login), So that we ensure all necessary fields (email and password) are included in the request body, improving security and preventing errors.
Acceptance Criteria
Testing