mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 19:51:37 +00:00
Forward Auth refactor and adding PROXY_FORWARD_AUTH_LOGOUT_URI env
This commit is contained in:
parent
8558baf30a
commit
73a61872fa
9 changed files with 139 additions and 68 deletions
|
|
@ -75,9 +75,8 @@ export default {
|
|||
this.$setLanguageCode(lang)
|
||||
},
|
||||
logout() {
|
||||
var rootSocket = this.$root.socket || {}
|
||||
const logoutPayload = {
|
||||
socketId: rootSocket.id
|
||||
socketId: (this.$root.socket || {}).id
|
||||
}
|
||||
this.$axios.$post('/logout', logoutPayload).catch((error) => {
|
||||
console.error(error)
|
||||
|
|
@ -87,7 +86,13 @@ export default {
|
|||
}
|
||||
this.$store.commit('libraries/setUserPlaylists', [])
|
||||
this.$store.commit('libraries/setCollections', [])
|
||||
this.$router.push('/login')
|
||||
|
||||
if (this.$store.getters['user/getForwardAuthLogoutURI']) {
|
||||
// Redirect to forward auth logout uri
|
||||
location.replace(this.$store.getters['user/getForwardAuthLogoutURI'])
|
||||
} else {
|
||||
this.$router.push('/login')
|
||||
}
|
||||
},
|
||||
resetForm() {
|
||||
this.password = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue