hide redirect check auth

This commit is contained in:
Warunee Tamkoo 2024-07-16 21:37:39 +07:00
parent 73e81d5e6c
commit ede985939a

View file

@ -75,18 +75,18 @@ router.beforeEach((to, from, next) => {
console.log('keycloak===>', keycloak)
console.log('keycloak authenticated===>', keycloak.authenticated)
if (keycloak.authenticated === undefined) {
window.location.href = 'https://bma-sso.frappet.synology.me'
// } else {
// // keycloak.updateToken(60);
// // const role = keycloak.tokenParsed?.role
// // if (role.includes(to.meta.Role)) {
// next()
// // } else {
// // next({ path: '' })
// // // next();
// // }
}
// if (keycloak.authenticated === undefined) {
// window.location.href = 'https://bma-sso.frappet.synology.me'
// } else {
// // keycloak.updateToken(60);
// // const role = keycloak.tokenParsed?.role
// // if (role.includes(to.meta.Role)) {
// next()
// // } else {
// // next({ path: '' })
// // // next();
// // }
// }
} else {
next()
}