mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: enhance logout logic to handle different user source types
This commit is contained in:
parent
0c0f30c58e
commit
74efef904f
|
|
@ -29,6 +29,7 @@ interface User {
|
|||
language?: string
|
||||
workspace_list?: Array<any>
|
||||
role_name?: Array<any>
|
||||
source?: string
|
||||
}
|
||||
|
||||
interface LoginRequest {
|
||||
|
|
|
|||
|
|
@ -188,7 +188,11 @@ const openResetPassword = () => {
|
|||
|
||||
const logout = () => {
|
||||
login.logout().then(() => {
|
||||
router.push({name: 'login', query: {login_mode: 'manual'}})
|
||||
if (user?.userInfo?.source && ['CAS', 'OIDC', 'OAuth2'].includes(user.userInfo.source)) {
|
||||
router.push({name: 'login', query: {login_mode: 'manual'}})
|
||||
} else {
|
||||
router.push({name: 'login'})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue