Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/app/client/src/elements/ucdlib-iam-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion services/app/client/src/models/AppStateModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class AppStateModelImpl extends AppStateModel {
this.defaultPage = 'home';
this.currentPage = this.defaultPage;
this.store = AppStateStore;

this.inject('AuthModel');

}

/**
Expand All @@ -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();
}
Comment on lines 25 to 28

const modals = document?.querySelectorAll?.('ucdlib-iam-modal');
Expand Down