@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 +15 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +15 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/src/passkeyme-auth.d.ts.map +1 -1
- package/dist/src/utils/logger.d.ts +4 -0
- package/dist/src/utils/logger.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
this.config.enabled = true;
|
|
31
31
|
this.config.level = "debug";
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Get current logger configuration (for debugging)
|
|
35
|
+
*/
|
|
36
|
+
getConfig() {
|
|
37
|
+
return { ...this.config };
|
|
38
|
+
}
|
|
33
39
|
shouldLog(level) {
|
|
34
40
|
if (!this.config.enabled)
|
|
35
41
|
return false;
|
|
@@ -44,7 +50,7 @@
|
|
|
44
50
|
}
|
|
45
51
|
debug(message, ...args) {
|
|
46
52
|
if (this.shouldLog("debug")) {
|
|
47
|
-
console.
|
|
53
|
+
console.log(...this.formatMessage(message, ...args));
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
56
|
info(message, ...args) {
|
|
@@ -838,6 +844,7 @@
|
|
|
838
844
|
if (this.config.debug) {
|
|
839
845
|
logger.enableDebug();
|
|
840
846
|
console.log("[DEBUG] Logger debug mode enabled, testing logger...");
|
|
847
|
+
console.log("[DEBUG] Logger config after enableDebug:", logger.getConfig());
|
|
841
848
|
logger.debug("Logger test message - if you see this, logger is working");
|
|
842
849
|
}
|
|
843
850
|
logger.debug("Initialized with config:", this.config);
|
|
@@ -1515,13 +1522,13 @@
|
|
|
1515
1522
|
let appConfig;
|
|
1516
1523
|
try {
|
|
1517
1524
|
appConfig = await this.getAppConfig();
|
|
1518
|
-
|
|
1525
|
+
console.log("App config loaded:", {
|
|
1519
1526
|
discoverableCredentialsEnabled: appConfig.discoverableCredentialsEnabled,
|
|
1520
1527
|
passkeyEnabled: appConfig.passkeyEnabled,
|
|
1521
1528
|
});
|
|
1522
1529
|
}
|
|
1523
1530
|
catch (configError) {
|
|
1524
|
-
|
|
1531
|
+
console.log("[DEBUG] Failed to load app config, assuming passkeys enabled:", configError);
|
|
1525
1532
|
// If we can't load config, assume passkeys are enabled and no discoverable credentials
|
|
1526
1533
|
appConfig = {
|
|
1527
1534
|
passkeyEnabled: true,
|
|
@@ -1530,7 +1537,7 @@
|
|
|
1530
1537
|
}
|
|
1531
1538
|
// If passkeys are disabled at the app level, fallback to hosted auth
|
|
1532
1539
|
if (!appConfig.passkeyEnabled) {
|
|
1533
|
-
|
|
1540
|
+
console.log("Passkeys disabled for this app, falling back to hosted auth");
|
|
1534
1541
|
this.redirectToLogin();
|
|
1535
1542
|
return { method: "redirect" };
|
|
1536
1543
|
}
|
|
@@ -1552,11 +1559,11 @@
|
|
|
1552
1559
|
}
|
|
1553
1560
|
// Try to get stored username for fallback
|
|
1554
1561
|
const storageKey = `last_username_${this.config.appId}`;
|
|
1555
|
-
|
|
1562
|
+
console.log("Looking for stored username with key:", storageKey);
|
|
1556
1563
|
const storedUsername = await this.storage.getItem(storageKey);
|
|
1557
|
-
|
|
1564
|
+
console.log("Found stored username:", storedUsername);
|
|
1558
1565
|
if (storedUsername) {
|
|
1559
|
-
|
|
1566
|
+
console.log("Using stored username for targeted authentication:", storedUsername);
|
|
1560
1567
|
authUsername = storedUsername;
|
|
1561
1568
|
}
|
|
1562
1569
|
else {
|
|
@@ -1644,6 +1651,7 @@
|
|
|
1644
1651
|
return this._appConfigPromise;
|
|
1645
1652
|
}
|
|
1646
1653
|
}
|
|
1654
|
+
// Test comment
|
|
1647
1655
|
|
|
1648
1656
|
/**
|
|
1649
1657
|
* HTTP interceptors for automatic token management
|