@lumiapassport/ui-kit 1.4.4 → 1.4.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/iframe/main.js +15 -0
- package/dist/iframe/main.js.map +1 -1
- package/dist/index.cjs +1 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -28
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/iframe/main.js
CHANGED
|
@@ -1576,6 +1576,21 @@ var SessionManager = class {
|
|
|
1576
1576
|
console.log(`[iframe][Session] Cleaned up ${cleanedCount} expired sessions`);
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
|
+
/**
|
|
1580
|
+
* Check if there is an active session for a given origin
|
|
1581
|
+
*/
|
|
1582
|
+
hasSession(origin) {
|
|
1583
|
+
const now = Date.now();
|
|
1584
|
+
for (const session of this.sessions.values()) {
|
|
1585
|
+
if (session.origin === origin) {
|
|
1586
|
+
const age = now - session.lastActivity;
|
|
1587
|
+
if (age <= this.SESSION_TIMEOUT) {
|
|
1588
|
+
return true;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
return false;
|
|
1593
|
+
}
|
|
1579
1594
|
/**
|
|
1580
1595
|
* Get session statistics
|
|
1581
1596
|
*/
|