From 756040935830fd95c5f7f9dc791fe4386f6e6d84 Mon Sep 17 00:00:00 2001 From: Sabrina Baggett Date: Mon, 15 Jun 2026 13:19:23 -0700 Subject: [PATCH] logout fixed --- services/app/client/src/elements/ucdlib-iam-app.js | 2 +- services/app/client/src/models/AppStateModel.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/services/app/client/src/elements/ucdlib-iam-app.js b/services/app/client/src/elements/ucdlib-iam-app.js index 9a556e3..97edd36 100644 --- a/services/app/client/src/elements/ucdlib-iam-app.js +++ b/services/app/client/src/elements/ucdlib-iam-app.js @@ -194,7 +194,7 @@ export default class UcdlibIamApp extends Mixin(LitElement) const silentCheckSsoRedirectUri = window.location.origin + '/silent-check-sso.html'; // set up listeners keycloak listeners - // kc.onAuthRefreshError = () => {AuthModel.logout(true);}; + kc.onAuthRefreshError = () => {AuthModel.logout(true);}; kc.onAuthError = () => {AuthModel.redirectUnauthorized();}; kc.onAuthSuccess = () => { customElements.define('ucdlib-iam-app', UcdlibIamApp); diff --git a/services/app/client/src/models/AppStateModel.js b/services/app/client/src/models/AppStateModel.js index e123fdb..ff2719b 100644 --- a/services/app/client/src/models/AppStateModel.js +++ b/services/app/client/src/models/AppStateModel.js @@ -12,6 +12,9 @@ class AppStateModelImpl extends AppStateModel { this.defaultPage = 'home'; this.currentPage = this.defaultPage; this.store = AppStateStore; + + this.inject('AuthModel'); + } /** @@ -21,7 +24,7 @@ class AppStateModelImpl extends AppStateModel { */ set(update) { if ( update.location.path.length && update.location.path[0] == 'logout' ){ - this.logout(); + this.AuthModel.logout(); } const modals = document?.querySelectorAll?.('ucdlib-iam-modal');