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.
@@ -661,10 +661,8 @@ function createAuthRouter(options = {}) {
661
661
  );
662
662
  r.post("/login", validateLogin, async (req, res) => {
663
663
  const { email: emailAddress, password } = req.body || {};
664
- console.log(emailAddress, password, "body");
665
664
  try {
666
665
  const user = await OrgUser.findOne({ email: emailAddress }).select("+password").lean();
667
- console.log(user, "user");
668
666
  if (!user) {
669
667
  return res.status(400).json({
670
668
  error: "Invalid email or password",
@@ -1233,6 +1231,8 @@ function setAuthCookies(res, tokens, cookie) {
1233
1231
  if (cookie.domain) {
1234
1232
  base.domain = cookie.domain;
1235
1233
  }
1234
+ console.log(cookie, "cookie");
1235
+ console.log(base, "base");
1236
1236
  if (tokens?.access_token) {
1237
1237
  res.cookie("access_token", tokens.access_token, base);
1238
1238
  }
@@ -1279,7 +1279,6 @@ async function sendRateLimitedEmail({
1279
1279
  if (!can.ok) {
1280
1280
  return { rateLimited: true, waitMs: can.waitMs };
1281
1281
  }
1282
- console.log(can, "can");
1283
1282
  await emailService.send(user.email, subject, html);
1284
1283
  user.lastEmailSent = [...user.lastEmailSent || [], /* @__PURE__ */ new Date()];
1285
1284
  await user.save();