Commit 27fd5767 authored by Clément's avatar Clément
parent 08bd1c7e
Pipeline #5268 passed with stage
in 53 seconds
......@@ -31,9 +31,10 @@ class SIBAuth extends HTMLElement {
if (await this.getUserWebId()) {
this.dispatchUserInfo();
}
const session = await new Promise(a => auth.trackSession(a));
const session = await this.trackSession();
if (!session) return;
const timeout = session.idClaims.exp * 1000 - Date.now();
if (timeout > 1000 * 60 * 60 * 24 * 2) return; // 2 days
setTimeout(() => {
this.logout();
}, timeout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment