From 031ddebd0b5d4f85da2463ca87fc271c04680929 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Agneray?= <francois.agneray@lam.fr>
Date: Fri, 17 Sep 2021 14:51:21 +0200
Subject: [PATCH] KeycloakEventType = OnAuthLogout => force logout

---
 client/src/app/auth/init.keycloak.ts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/client/src/app/auth/init.keycloak.ts b/client/src/app/auth/init.keycloak.ts
index a3111fa4..34ee8d9f 100644
--- a/client/src/app/auth/init.keycloak.ts
+++ b/client/src/app/auth/init.keycloak.ts
@@ -21,6 +21,9 @@ export function initializeKeycloak(keycloak: KeycloakService, store: Store<{ }>,
     }
 
     from(keycloak.keycloakEvents$).subscribe(event => {
+        if (event.type === KeycloakEventType.OnAuthLogout) {
+            store.dispatch(keycloakActions.logout());
+        }
         if (event.type === KeycloakEventType.OnAuthSuccess) {
             store.dispatch(keycloakActions.authSuccess());
         }
-- 
GitLab