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.js CHANGED
@@ -727,10 +727,8 @@ function createAuthRouter(options = {}) {
727
727
  );
728
728
  r.post("/login", validateLogin, async (req, res) => {
729
729
  const { email: emailAddress, password } = req.body || {};
730
- console.log(emailAddress, password, "body");
731
730
  try {
732
731
  const user = await OrgUser.findOne({ email: emailAddress }).select("+password").lean();
733
- console.log(user, "user");
734
732
  if (!user) {
735
733
  return res.status(400).json({
736
734
  error: "Invalid email or password",
@@ -1299,6 +1297,8 @@ function setAuthCookies(res, tokens, cookie) {
1299
1297
  if (cookie.domain) {
1300
1298
  base.domain = cookie.domain;
1301
1299
  }
1300
+ console.log(cookie, "cookie");
1301
+ console.log(base, "base");
1302
1302
  if (tokens?.access_token) {
1303
1303
  res.cookie("access_token", tokens.access_token, base);
1304
1304
  }
@@ -1345,7 +1345,6 @@ async function sendRateLimitedEmail({
1345
1345
  if (!can.ok) {
1346
1346
  return { rateLimited: true, waitMs: can.waitMs };
1347
1347
  }
1348
- console.log(can, "can");
1349
1348
  await emailService.send(user.email, subject, html);
1350
1349
  user.lastEmailSent = [...user.lastEmailSent || [], /* @__PURE__ */ new Date()];
1351
1350
  await user.save();