diff --git a/projects/auth-js/oidc/oidc-auth-manager.ts b/projects/auth-js/oidc/oidc-auth-manager.ts index d842f6a..98eed6f 100644 --- a/projects/auth-js/oidc/oidc-auth-manager.ts +++ b/projects/auth-js/oidc/oidc-auth-manager.ts @@ -115,6 +115,10 @@ export class OIDCAuthManager extends AuthManager { }), this.userManager.events.addUserUnloaded(() => { this.user = null; + // If user is kicked out for any reason -> reload the app if login is required + if (this.settings.loginRequired) { + location.reload(); + } }), this.userManager.events.addSilentRenewError(async () => { await this.removeUser();