updateAuthen

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-25 12:57:27 +07:00
parent 8f103aeb71
commit 02827aa02d
5 changed files with 63 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 === undefined && to.meta.Auth) {
if (keycloak.authenticated === false && to.meta.Auth) {
window.location.href = "/login";
}
} else {