diff --git a/back/api/system.ts b/back/api/system.ts index 01f39818..7336d068 100644 --- a/back/api/system.ts +++ b/back/api/system.ts @@ -384,6 +384,7 @@ export default (app: Router) => { body: Joi.object({ retries: Joi.number().optional(), twoFactorActivated: Joi.boolean().optional(), + password: Joi.string().optional(), }), }), async (req: Request, res: Response, next: NextFunction) => { diff --git a/back/services/user.ts b/back/services/user.ts index 22a9edff..a2cb0ef7 100644 --- a/back/services/user.ts +++ b/back/services/user.ts @@ -347,11 +347,12 @@ export default class UserService { } public async resetAuthInfo(info: Partial) { - const { retries, twoFactorActivated } = info; + const { retries, twoFactorActivated, password } = info; const authInfo = await this.getAuthInfo(); await this.updateAuthInfo(authInfo, { retries, twoFactorActivated, + password, }); } }