aaspai-authx 0.1.3 → 0.1.4

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.
@@ -699,10 +699,8 @@ function createAuthRouter(options = {}) {
699
699
  );
700
700
  r.post("/login", validateLogin, async (req, res) => {
701
701
  const { email: emailAddress, password } = req.body || {};
702
- console.log(emailAddress, password, "body");
703
702
  try {
704
703
  const user = await OrgUser.findOne({ email: emailAddress }).select("+password").lean();
705
- console.log(user, "user");
706
704
  if (!user) {
707
705
  return res.status(400).json({
708
706
  error: "Invalid email or password",
@@ -1271,6 +1269,8 @@ function setAuthCookies(res, tokens, cookie) {
1271
1269
  if (cookie.domain) {
1272
1270
  base.domain = cookie.domain;
1273
1271
  }
1272
+ console.log(cookie, "cookie");
1273
+ console.log(base, "base");
1274
1274
  if (tokens?.access_token) {
1275
1275
  res.cookie("access_token", tokens.access_token, base);
1276
1276
  }
@@ -1317,7 +1317,6 @@ async function sendRateLimitedEmail({
1317
1317
  if (!can.ok) {
1318
1318
  return { rateLimited: true, waitMs: can.waitMs };
1319
1319
  }
1320
- console.log(can, "can");
1321
1320
  await emailService.send(user.email, subject, html);
1322
1321
  user.lastEmailSent = [...user.lastEmailSent || [], /* @__PURE__ */ new Date()];
1323
1322
  await user.save();