@passkeyme/auth 1.1.4 → 1.1.6

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.esm.js CHANGED
@@ -24,6 +24,12 @@ class Logger {
24
24
  this.config.enabled = true;
25
25
  this.config.level = "debug";
26
26
  }
27
+ /**
28
+ * Get current logger configuration (for debugging)
29
+ */
30
+ getConfig() {
31
+ return { ...this.config };
32
+ }
27
33
  shouldLog(level) {
28
34
  if (!this.config.enabled)
29
35
  return false;
@@ -38,7 +44,7 @@ class Logger {
38
44
  }
39
45
  debug(message, ...args) {
40
46
  if (this.shouldLog("debug")) {
41
- console.debug(...this.formatMessage(message, ...args));
47
+ console.log(...this.formatMessage(message, ...args));
42
48
  }
43
49
  }
44
50
  info(message, ...args) {
@@ -832,6 +838,7 @@ class PasskeymeAuth {
832
838
  if (this.config.debug) {
833
839
  logger.enableDebug();
834
840
  console.log("[DEBUG] Logger debug mode enabled, testing logger...");
841
+ console.log("[DEBUG] Logger config after enableDebug:", logger.getConfig());
835
842
  logger.debug("Logger test message - if you see this, logger is working");
836
843
  }
837
844
  logger.debug("Initialized with config:", this.config);
@@ -1509,13 +1516,13 @@ class PasskeymeAuth {
1509
1516
  let appConfig;
1510
1517
  try {
1511
1518
  appConfig = await this.getAppConfig();
1512
- logger.debug("App config loaded:", {
1519
+ console.log("App config loaded:", {
1513
1520
  discoverableCredentialsEnabled: appConfig.discoverableCredentialsEnabled,
1514
1521
  passkeyEnabled: appConfig.passkeyEnabled,
1515
1522
  });
1516
1523
  }
1517
1524
  catch (configError) {
1518
- logger.debug("Failed to load app config, assuming passkeys enabled:", configError);
1525
+ console.log("[DEBUG] Failed to load app config, assuming passkeys enabled:", configError);
1519
1526
  // If we can't load config, assume passkeys are enabled and no discoverable credentials
1520
1527
  appConfig = {
1521
1528
  passkeyEnabled: true,
@@ -1524,7 +1531,7 @@ class PasskeymeAuth {
1524
1531
  }
1525
1532
  // If passkeys are disabled at the app level, fallback to hosted auth
1526
1533
  if (!appConfig.passkeyEnabled) {
1527
- logger.debug("Passkeys disabled for this app, falling back to hosted auth");
1534
+ console.log("Passkeys disabled for this app, falling back to hosted auth");
1528
1535
  this.redirectToLogin();
1529
1536
  return { method: "redirect" };
1530
1537
  }
@@ -1546,11 +1553,11 @@ class PasskeymeAuth {
1546
1553
  }
1547
1554
  // Try to get stored username for fallback
1548
1555
  const storageKey = `last_username_${this.config.appId}`;
1549
- logger.debug("Looking for stored username with key:", storageKey);
1556
+ console.log("Looking for stored username with key:", storageKey);
1550
1557
  const storedUsername = await this.storage.getItem(storageKey);
1551
- logger.debug("Found stored username:", storedUsername);
1558
+ console.log("Found stored username:", storedUsername);
1552
1559
  if (storedUsername) {
1553
- logger.debug("Using stored username for targeted authentication:", storedUsername);
1560
+ console.log("Using stored username for targeted authentication:", storedUsername);
1554
1561
  authUsername = storedUsername;
1555
1562
  }
1556
1563
  else {
@@ -1638,6 +1645,7 @@ class PasskeymeAuth {
1638
1645
  return this._appConfigPromise;
1639
1646
  }
1640
1647
  }
1648
+ // Test comment
1641
1649
 
1642
1650
  /**
1643
1651
  * HTTP interceptors for automatic token management