I'm trying to authenticate a user using @feathersjs/authentication-local, Though I'm giving proper username & password, I get following response
{
"name": "BadRequest",
"message": "Missing credentials",
"code": 400,
"className": "bad-request",
"data": {
"message": "Missing credentials"
},
"errors": {}
}
DB property of user
entity is username
& password
. My configuration is as following
const settings = {
secret: 'super&secret',
usernameField: 'username',
passwordField: 'password',
entityUsernameField: 'username',
entityPasswordField: 'password'
};
app.configure(authentication(settings))
.configure(local());
app.service('authentication').hooks({
before: {
create: [authentication.hooks.authenticate(['local', 'jwt'])],
remove: [],
}
});
I've added "strategy": "local"
on request body. What am I missing? Please help.