From 56aa900ea333294a50fdda80780df2ecd0a333ab Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 26 Jul 2024 10:42:31 +0700 Subject: [PATCH] fixing --- src/router/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index a5a9700..a095cb9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -77,10 +77,8 @@ const router = createRouter({ // authen with keycloak client router.beforeEach((to, from, next) => { - if (to.meta.Auth) { - if (keycloak.authenticated === undefined && to.meta.Auth) { - kcLogout(); - } + if (keycloak.authenticated === undefined && to.meta.Auth) { + kcLogout(); } else { next(); }