ecrs-auth-core 1.0.113 → 1.0.114

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.
@@ -326,6 +326,7 @@ let AuthCustomerService = class AuthCustomerService {
326
326
  }
327
327
  async getCustomerIdBySubdomain(subdomain) {
328
328
  const rows = await this.userRepo.query(`SELECT customer_id FROM public.tbl_super_customer_ets_setup_details WHERE subdomain = $1 LIMIT 1`, [subdomain]);
329
+ console.log(`🔍 Subdomain "${subdomain}" → customer_id=${rows[0]?.customer_id ?? null}`);
329
330
  return rows[0]?.customer_id ?? null;
330
331
  }
331
332
  // In auth-customer.service.ts — add this new method
@@ -29,6 +29,7 @@ let JwtCustomerStrategy = class JwtCustomerStrategy extends (0, passport_1.Passp
29
29
  const host = req.get("host") || "";
30
30
  const hostParts = host.split(".");
31
31
  const subdomain = hostParts.length > 2 ? hostParts[0] : null;
32
+ console.log(`🔍 Validating JWT for subdomain: ${subdomain ?? "N/A"}`);
32
33
  if (subdomain) {
33
34
  const customerId = await this.authCustomerService.getCustomerIdBySubdomain(subdomain);
34
35
  if (!customerId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecrs-auth-core",
3
- "version": "1.0.113",
3
+ "version": "1.0.114",
4
4
  "description": "Centralized authentication and authorization module for ECRS apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",