perf: cas auth (#3436)
This commit is contained in:
parent
305cdea34b
commit
bd75a3d5bc
@ -44,7 +44,7 @@ router.beforeEach(
|
|||||||
}
|
}
|
||||||
const p_token = to.query.token
|
const p_token = to.query.token
|
||||||
if (p_token) {
|
if (p_token) {
|
||||||
chatUser.setToken(p_token)
|
chatUser.setToken(p_token as string)
|
||||||
}
|
}
|
||||||
const token = chatUser.getToken()
|
const token = chatUser.getToken()
|
||||||
if (authentication) {
|
if (authentication) {
|
||||||
@ -75,7 +75,12 @@ router.beforeEach(
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
next()
|
if (p_token) {
|
||||||
|
next({ ...to, query: {} })
|
||||||
|
} else {
|
||||||
|
next()
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user