Protecting routes on hte FE and improving authentication
This commit is contained in:
@ -36,7 +36,8 @@ export function val(api) {
|
||||
localStorage.setItem("token", response.authentication_token.token);
|
||||
localStorage.setItem("token_expiry", response.authentication_token.expiry);
|
||||
showSuccess("login-messages", "Login successful.")
|
||||
location.href = "/";
|
||||
// location.href = "/";
|
||||
document.getElementById("login-form").submit()
|
||||
} else {
|
||||
showError("login-messages", response.message)
|
||||
}
|
||||
|
Reference in New Issue
Block a user