I use it on feathersjs, but it doesn't work, what if I use it on feathersjs
this my code
`const { authenticate } = require('@feathersjs/authentication').hooks;
var hashers = require('node-django-hashers');
// const {
// hashPassword, protect
// } = require('@feathersjs/authentication-local').hooks;
var hashPassword = new hashers.PBKDF2SHA1PasswordHasher();
module.exports = {
before: {
all: [],
find: [ authenticate('jwt') ],
get: [ authenticate('jwt') ],
create: [ hashPassword.encode() ],
update: [ hashPassword.encode(), authenticate('jwt') ],
patch: [ hashPassword.encode(), authenticate('jwt') ],
remove: [ authenticate('jwt') ]
},
after: {
all: [
// Make sure the password field is never sent to the client
// Always must be the last hook
// protect('password')
],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
error: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
}
};`
I use it on feathersjs, but it doesn't work, what if I use it on feathersjs
this my code
`const { authenticate } = require('@feathersjs/authentication').hooks;
var hashers = require('node-django-hashers');
// const {
// hashPassword, protect
// } = require('@feathersjs/authentication-local').hooks;
var hashPassword = new hashers.PBKDF2SHA1PasswordHasher();
module.exports = {
before: {
all: [],
find: [ authenticate('jwt') ],
get: [ authenticate('jwt') ],
create: [ hashPassword.encode() ],
update: [ hashPassword.encode(), authenticate('jwt') ],
patch: [ hashPassword.encode(), authenticate('jwt') ],
remove: [ authenticate('jwt') ]
},
after: {
all: [
// Make sure the password field is never sent to the client
// Always must be the last hook
// protect('password')
],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
error: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
}
};`