ballyalley-o / tccp-server

A scalable backend server solution designed to manage and orchestrate software development bootcamps/courses from multiple schools, providing robust APIs and data storage capabilities.
2 stars 0 forks source link

[BUG] : Invalid Credentials is sending OK HTTP Code #52: Fix user authentication bug Fix user authentication bug #53

Closed ballyalley-o closed 2 months ago

ballyalley-o commented 2 months ago

This pull request fixes a bug where logging in with invalid credentials would result in a 200 or OK HTTP code instead of throwing an error message. The issue was caused by the _sendTokenResponse function being called even when the user was not found. This pull request adds a check to only call the function if the user is found.