Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helpme #7

Open
rofiuddin15 opened this issue Aug 5, 2018 · 0 comments
Open

helpme #7

rofiuddin15 opened this issue Aug 5, 2018 · 0 comments

Comments

@rofiuddin15
Copy link

rofiuddin15 commented Aug 5, 2018

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: []
}
};`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant