Change message in auth feathers js

109 Views Asked by At

I'm trying to change the message of sendResetPwd on feather auth management because he has security issues, I think

I have this result

BadRequest: User not found.
    at new BadRequest (node_modules/@feathersjs/errors/lib/index.js:86:17)
    at getUserData (/node_modules/feathers-authentication-management/lib/helpers.js:93:11)
    at node_modules/feathers-authentication-management/lib/sendResetPwd.js:32:14

Is there a way to change message "User not found"

Same for

BadRequest: User is not verified.

Thanks in advance Carlos Vieira

1

There are 1 best solutions below

0
On

I found a hack solution In feathers app-hoks set this

error: {
    all: [
      preventErrorMessages,
    ]
}

and check for 'sendResetPwd' in context and set new message error fired up