fixing check token

This commit is contained in:
Warunee Tamkoo 2024-07-26 10:19:35 +07:00
parent 8d51e6f623
commit f6b2b26998
5 changed files with 33 additions and 21 deletions

View file

@ -78,7 +78,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 {