0

I'm trying to log in a user using the vuex store.

onSubmit() {
  this.$store
    .dispatch("auth/authenticate", {
      username: "Sibi",
      password: "123",
      strategy: "local"
    })

    .then(function(result) {
      console.log("Authenticated!", result);
    })
    .catch(function(error) {
      console.error("Error authenticating!", error);
    });
}

I get a 401 error

I have followed the docs and everything seems to be working for the signup. Even if I hardcode the username and password it still shows Invalid

vojislav
  • 105
  • 1
  • 8
  • Check out the config in `default.json` (see https://github.com/feathersjs/feathers-chat/blob/8030e2535e28c600e06fc7a23f87fe8236851815/config/default.json#L33-L36) . Check if you did change the `usernameField` is set to `username` – user1778855 Dec 17 '20 at 16:53
  • it is : "local": { "usernameField": "username", "passwordField": "password" } – vojislav Dec 21 '20 at 14:13

0 Answers0