feat: enhance logout logic to handle different user source types
parent
0c0f30c58e
commit
74efef904f
|
|
@ -29,6 +29,7 @@ interface User {
|
||||||
language?: string
|
language?: string
|
||||||
workspace_list?: Array<any>
|
workspace_list?: Array<any>
|
||||||
role_name?: Array<any>
|
role_name?: Array<any>
|
||||||
|
source?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LoginRequest {
|
interface LoginRequest {
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,11 @@ const openResetPassword = () => {
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
login.logout().then(() => {
|
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