@passkeyme/auth 1.1.3 → 1.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.umd.js CHANGED
@@ -837,8 +837,11 @@
837
837
  // Configure logger with debug setting from config
838
838
  if (this.config.debug) {
839
839
  logger.enableDebug();
840
+ console.log("[DEBUG] Logger debug mode enabled, testing logger...");
841
+ logger.debug("Logger test message - if you see this, logger is working");
840
842
  }
841
843
  logger.debug("Initialized with config:", this.config);
844
+ console.log("[DEBUG] Constructor completed, config.debug:", this.config.debug);
842
845
  }
843
846
  /**
844
847
  * Create default passkey SDK based on environment
@@ -1486,16 +1489,23 @@
1486
1489
  * 4. Fallback to hosted auth if all passkey attempts fail
1487
1490
  */
1488
1491
  async smartLogin(username, apiKey) {
1492
+ console.log("[DEBUG] smartLogin called with:", {
1493
+ username,
1494
+ hasApiKey: !!apiKey,
1495
+ });
1489
1496
  logger.debug("smartLogin called with:", {
1490
1497
  username,
1491
1498
  hasApiKey: !!apiKey,
1492
1499
  });
1493
1500
  // Use provided API key or fall back to config
1494
1501
  const effectiveApiKey = apiKey || this.getPasskeyApiKey();
1502
+ console.log("[DEBUG] effectiveApiKey:", !!effectiveApiKey);
1495
1503
  // Check if passkeys are supported and we have an API key
1496
1504
  const isSupported = this.isPasskeySupported();
1505
+ console.log("[DEBUG] Passkey support check:", isSupported);
1497
1506
  logger.debug("Passkey support check:", isSupported);
1498
1507
  if (!isSupported || !effectiveApiKey) {
1508
+ console.log("[DEBUG] Conditions not met, redirecting to hosted auth. isSupported:", isSupported, "hasApiKey:", !!effectiveApiKey);
1499
1509
  logger.debug("Conditions not met, redirecting to hosted auth. isSupported:", isSupported, "hasApiKey:", !!effectiveApiKey);
1500
1510
  this.redirectToLogin();
1501
1511
  return { method: "redirect" };