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.
@@ -695,10 +695,8 @@ function createAuthRouter(options = {}) {
695
695
  );
696
696
  r.post("/login", validateLogin, async (req, res) => {
697
697
  const { email: emailAddress, password } = req.body || {};
698
- console.log(emailAddress, password, "body");
699
698
  try {
700
699
  const user = await OrgUser.findOne({ email: emailAddress }).select("+password").lean();
701
- console.log(user, "user");
702
700
  if (!user) {
703
701
  return res.status(400).json({
704
702
  error: "Invalid email or password",
@@ -1267,6 +1265,8 @@ function setAuthCookies(res, tokens, cookie) {
1267
1265
  if (cookie.domain) {
1268
1266
  base.domain = cookie.domain;
1269
1267
  }
1268
+ console.log(cookie, "cookie");
1269
+ console.log(base, "base");
1270
1270
  if (tokens?.access_token) {
1271
1271
  res.cookie("access_token", tokens.access_token, base);
1272
1272
  }
@@ -1313,7 +1313,6 @@ async function sendRateLimitedEmail({
1313
1313
  if (!can.ok) {
1314
1314
  return { rateLimited: true, waitMs: can.waitMs };
1315
1315
  }
1316
- console.log(can, "can");
1317
1316
  await emailService.send(user.email, subject, html);
1318
1317
  user.lastEmailSent = [...user.lastEmailSent || [], /* @__PURE__ */ new Date()];
1319
1318
  await user.save();