diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-14 17:13:40 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-14 17:13:40 +0300 |
commit | 1ab199588d5353d98d49172e1f35d73452069faf (patch) | |
tree | 5699ba9d7e16b89e6ebefaf49d6992bb3eb6f3cd | |
parent | fc4bdecdcd8abc7a2adaeb4b7f209f6930846ffa (diff) | |
download | which-api-1ab199588d5353d98d49172e1f35d73452069faf.tar.gz |
feat: protect password field
-rw-r--r-- | services/users/users.hooks.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/users/users.hooks.ts b/services/users/users.hooks.ts index 06cbfde..fc17ed7 100644 --- a/services/users/users.hooks.ts +++ b/services/users/users.hooks.ts @@ -1,8 +1,12 @@ import { hooks } from '@feathersjs/authentication-local'; const hashPassword = hooks.hashPassword('password'); +const protectPassword = hooks.protect('password'); export default { + after: { + all: [protectPassword] + }, before: { create: [hashPassword], patch: [hashPassword], |