From 1ab199588d5353d98d49172e1f35d73452069faf Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 14 Jun 2020 17:13:40 +0300 Subject: feat: protect password field --- services/users/users.hooks.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'services') 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], -- cgit v1.2.3