I am trying to add another user and I am experimenting with this code showed all around the internet.
So I tried this example below, it works fine, but how could I add another user, let's say for a guest?
is it possible? with like a conditional?
I am just trying to learn more about js and how I can solve this type of simple thing.
methods: {
login() {
if(this.input.username == "admin1" && this.input.password == "pass1") {
this.$store.commit("setAuthentication", true);
this.$router.replace({ name: "secure" });
} else {
console.log("The username and / or password is incorrect");
}
}
}