Skip to content

Commit

Permalink
Updated: settings page to support redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Sep 22, 2023
1 parent 5f5ef01 commit b714319
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ export default defineComponent({
return timeZoneModal.present();
},
logout () {
this.store.dispatch('user/logout').then(() => {
const redirectUrl = window.location.origin + '/login'
window.location.href = `${process.env.VUE_APP_LOGIN_URL}?isLoggedOut=true&redirectUrl=${redirectUrl}`
this.store.dispatch('user/logout', { isUserUnauthorised: false }).then((redirectionUrl) => {
// if not having redirection url then redirect the user to launchpad
if(!redirectionUrl) {
const redirectUrl = window.location.origin + '/login'
window.location.href = `${process.env.VUE_APP_LOGIN_URL}?isLoggedOut=true&redirectUrl=${redirectUrl}`
}
})
},
goToLaunchpad() {
Expand Down

0 comments on commit b714319

Please sign in to comment.