diff --git a/packages/cli/src/UserManagement/routes/passwordReset.ts b/packages/cli/src/UserManagement/routes/passwordReset.ts index e621ab7b9d..ca22efd7c3 100644 --- a/packages/cli/src/UserManagement/routes/passwordReset.ts +++ b/packages/cli/src/UserManagement/routes/passwordReset.ts @@ -215,6 +215,13 @@ export function passwordResetNamespace(this: N8nApp): void { Logger.info('User password updated successfully', { userId }); await issueCookie(res, user); + + void InternalHooksManager.getInstance().onUserUpdate({ + user_id: userId, + fields_changed: ['password'], + }); + + await this.externalHooks.run('user.password.update', [user.email, password]); }), ); } diff --git a/packages/cli/test/integration/shared/utils.ts b/packages/cli/test/integration/shared/utils.ts index b3faaf8b0b..5fa3890fe2 100644 --- a/packages/cli/test/integration/shared/utils.ts +++ b/packages/cli/test/integration/shared/utils.ts @@ -101,7 +101,8 @@ export async function initTestServer({ if ( endpointGroups.includes('credentials') || endpointGroups.includes('me') || - endpointGroups.includes('users') + endpointGroups.includes('users') || + endpointGroups.includes('passwordReset') ) { testServer.externalHooks = ExternalHooks(); }