Skip to content

Commit

Permalink
Put the redirect to 401 page in else block
Browse files Browse the repository at this point in the history
This was still getting called after a successful login and overriding the
redirect to '/'
  • Loading branch information
alex9smith committed Nov 23, 2024
1 parent b579d63 commit 157b4f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ function Login() {
if (authenticationService.isValidUser(user)) {
authenticationService.setUser(user);
navigate("/");
} else {
navigate("/unauthorised");
}
navigate("/unauthorised");
}

function developmentLoginHandler() {
Expand Down

0 comments on commit 157b4f2

Please sign in to comment.