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.
package/dist/index.cjs CHANGED
@@ -779,10 +779,8 @@ function createAuthRouter(options = {}) {
779
779
  );
780
780
  r.post("/login", validateLogin, async (req, res) => {
781
781
  const { email: emailAddress, password } = req.body || {};
782
- console.log(emailAddress, password, "body");
783
782
  try {
784
783
  const user = await OrgUser.findOne({ email: emailAddress }).select("+password").lean();
785
- console.log(user, "user");
786
784
  if (!user) {
787
785
  return res.status(400).json({
788
786
  error: "Invalid email or password",
@@ -1351,6 +1349,8 @@ function setAuthCookies(res, tokens, cookie) {
1351
1349
  if (cookie.domain) {
1352
1350
  base.domain = cookie.domain;
1353
1351
  }
1352
+ console.log(cookie, "cookie");
1353
+ console.log(base, "base");
1354
1354
  if (tokens?.access_token) {
1355
1355
  res.cookie("access_token", tokens.access_token, base);
1356
1356
  }
@@ -1397,7 +1397,6 @@ async function sendRateLimitedEmail({
1397
1397
  if (!can.ok) {
1398
1398
  return { rateLimited: true, waitMs: can.waitMs };
1399
1399
  }
1400
- console.log(can, "can");
1401
1400
  await emailService.send(user.email, subject, html);
1402
1401
  user.lastEmailSent = [...user.lastEmailSent || [], /* @__PURE__ */ new Date()];
1403
1402
  await user.save();