@brggroup/share-lib 0.0.87 → 0.0.89
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.
|
@@ -584,20 +584,15 @@ class SessionManagerService {
|
|
|
584
584
|
this.updateActivity();
|
|
585
585
|
this.resetIdle();
|
|
586
586
|
this.electLeader();
|
|
587
|
-
window.addEventListener('storage', (event) => {
|
|
588
|
-
if (event.key === this.LOGIN_EVENT) {
|
|
589
|
-
location.reload();
|
|
590
|
-
}
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
stop() {
|
|
594
|
-
this.isRunning = false;
|
|
595
|
-
clearTimeout(this.idleTimer);
|
|
596
|
-
clearTimeout(this.refreshTimer);
|
|
597
|
-
clearInterval(this.heartbeatTimer);
|
|
598
|
-
this.channel?.close();
|
|
599
|
-
this.channel = null;
|
|
600
587
|
}
|
|
588
|
+
// stop() {
|
|
589
|
+
// this.isRunning = false;
|
|
590
|
+
// clearTimeout(this.idleTimer);
|
|
591
|
+
// clearTimeout(this.refreshTimer);
|
|
592
|
+
// clearInterval(this.heartbeatTimer);
|
|
593
|
+
// this.channel?.close();
|
|
594
|
+
// this.channel = null;
|
|
595
|
+
// }
|
|
601
596
|
/* -------------------------------- ACTIVITY -------------------------------- */
|
|
602
597
|
listenActivity() {
|
|
603
598
|
const events = ['mousemove', 'keydown', 'click', 'scroll'];
|
|
@@ -711,12 +706,15 @@ class SessionManagerService {
|
|
|
711
706
|
this.resetIdle();
|
|
712
707
|
}
|
|
713
708
|
if (type === this.LOGOUT_EVENT) {
|
|
709
|
+
console.log('APP_SESSION CHANNEL: ', this.LOGOUT_EVENT);
|
|
714
710
|
this.handlers.logout();
|
|
715
711
|
}
|
|
716
712
|
if (type === this.LOGIN_EVENT) {
|
|
713
|
+
console.log('APP_SESSION CHANNEL: ', this.LOGIN_EVENT);
|
|
717
714
|
location.reload();
|
|
718
715
|
}
|
|
719
716
|
if (type === this.TOKEN_REFRESH_EVENT) {
|
|
717
|
+
console.log('APP_SESSION CHANNEL: ', this.TOKEN_REFRESH_EVENT);
|
|
720
718
|
this.scheduleRefresh();
|
|
721
719
|
}
|
|
722
720
|
};
|
|
@@ -866,7 +864,7 @@ class AuthService extends HTTPService {
|
|
|
866
864
|
signOut() {
|
|
867
865
|
TokenStorage.clearToken();
|
|
868
866
|
this.sessionManager.broadcastLogout();
|
|
869
|
-
this.sessionManager.stop();
|
|
867
|
+
// this.sessionManager.stop();
|
|
870
868
|
const currentUrl = this.router.routerState.snapshot.url;
|
|
871
869
|
this.router.navigate(['/login'], {
|
|
872
870
|
queryParams: { returnUrl: currentUrl || '/' },
|