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