...
 
Commits (2)
...@@ -31,9 +31,10 @@ class SIBAuth extends HTMLElement { ...@@ -31,9 +31,10 @@ class SIBAuth extends HTMLElement {
if (await this.getUserWebId()) { if (await this.getUserWebId()) {
this.dispatchUserInfo(); this.dispatchUserInfo();
} }
const session = await new Promise(a => auth.trackSession(a)); const session = await this.trackSession();
if (!session) return; if (!session) return;
const timeout = session.idClaims.exp * 1000 - Date.now(); const timeout = session.idClaims.exp * 1000 - Date.now();
if (timeout > 1000 * 60 * 60 * 24 * 2) return; // 2 days
setTimeout(() => { setTimeout(() => {
this.logout(); this.logout();
}, timeout); }, timeout);
......