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(); }