updated authen
This commit is contained in:
parent
9ec6a7696a
commit
c1f0ac7939
5 changed files with 39 additions and 28 deletions
|
|
@ -82,8 +82,11 @@ const router = createRouter({
|
|||
|
||||
// authen with keycloak client
|
||||
router.beforeEach((to, from, next) => {
|
||||
// console.log('keycloak==>', keycloak)
|
||||
console.log('keycloak==>', keycloak.authenticated)
|
||||
|
||||
if (to.meta.Auth) {
|
||||
if (keycloak.authenticated === undefined && to.meta.Auth) {
|
||||
if (keycloak.authenticated === false && to.meta.Auth) {
|
||||
window.location.href = '/login'
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue