POST /api/auth/login
Authenticate a user with their email and password. Returns user information upon successful authentication.Authentication
No authentication required.Request body
Email address of the registered user
User password for authentication
Response
Unique user identifier
Full name of the authenticated user
Email address of the authenticated user
User role (
company or candidate)Example request
Example response
Status codes
User successfully authenticated
Invalid password provided
User not found with the provided email
Implementation details
- Passwords are verified using bcrypt comparison
- Passwords are truncated to 72 bytes before verification (matching registration behavior)
- Authentication is stateless - consider implementing session tokens for production use