@h-ai/iam 1.0.0-beta.21 → 1.0.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5990,7 +5990,7 @@ function buildRegistrationOps(ctx) {
5990
5990
  await userRepository.deleteById(createdUser.id);
5991
5991
  return assigned;
5992
5992
  }
5993
- logger13.info("User registered", { userId: createdUser.id, username: options.username });
5993
+ logger13.info("User registered", { userId: createdUser.id });
5994
5994
  return ok({
5995
5995
  user: toUser(createdUser),
5996
5996
  agreements: buildAgreementDisplay(agreementConfig, agreementConfig.showOnRegister)
@@ -6454,17 +6454,17 @@ function buildPasswordResetOps(ctx) {
6454
6454
  const captcha = await verifyIamCaptcha(ctx.config.captcha, "passwordReset", options?.captcha);
6455
6455
  if (!captcha.success)
6456
6456
  return captcha;
6457
- logger13.debug("Password reset requested", { identifier });
6457
+ logger13.debug("Password reset requested");
6458
6458
  const resetConfig = ctx.resetConfig;
6459
6459
  if (!resetConfig.enabled || !onPasswordResetRequest)
6460
6460
  return err(HaiIamError.PASSWORD_RESET_DISABLED, iamM("iam_passwordResetDisabled"));
6461
6461
  const userResult = await userRepository.findByIdentifier(identifier);
6462
6462
  if (!userResult.success) {
6463
- logger13.warn("Failed to look up user for password reset", { identifier });
6463
+ logger13.warn("Failed to look up user for password reset", { reasonCode: userResult.error.code });
6464
6464
  return ok(void 0);
6465
6465
  }
6466
6466
  if (!userResult.data) {
6467
- logger13.debug("User not found for password reset, returning ok to prevent enumeration", { identifier });
6467
+ logger13.debug("User not found for password reset");
6468
6468
  return ok(void 0);
6469
6469
  }
6470
6470
  const user = toUser(userResult.data);