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