Skip to content

Commit

Permalink
Fixed issue where user can log in with invalid credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanueposu committed May 30, 2024
1 parent 3faada6 commit efc7956
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trivia-forge/frontend/src/Pages/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function LoginPage() {
// call getUser function to validate user credentials
const user = await getUser(email, password);
// user doesn't exist
if (!user) {
if (user.error !== undefined) {
alert('Error logging in: Invalid email or password');
return;
}
Expand Down

0 comments on commit efc7956

Please sign in to comment.