fixing check token

This commit is contained in:
Warunee Tamkoo 2024-07-26 10:07:47 +07:00
parent 5e1dd0d2d7
commit f4592d2844
2 changed files with 1 additions and 4 deletions

View file

@ -108,7 +108,7 @@ const router = createRouter({
// authen with keycloak client
router.beforeEach((to, from, next) => {
if (to.meta.Auth) {
if (keycloak.authenticated === false && to.meta.Auth) {
if (keycloak.authenticated === undefined && to.meta.Auth) {
window.location.href = "/login";
}
} else {