Skip to content

Commit 4018f94

Browse files
authored
Fix auth on tenant change (#1043)
1 parent 7703c1b commit 4018f94

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

frontend/src/modules/dashboard/pages/dashboard-page.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
<script setup>
6060
import {
61-
onMounted, onBeforeUnmount, ref, computed,
61+
onMounted, onBeforeUnmount, ref, computed, watch,
6262
} from 'vue';
6363
import { useStore } from 'vuex';
6464
import AppDashboardIntegrations from '@/modules/dashboard/components/dashboard-active-integrations.vue';
@@ -115,6 +115,15 @@ onMounted(() => {
115115
onBeforeUnmount(() => {
116116
storeUnsubscribe.value();
117117
});
118+
119+
watch(currentTenant, (updatedTenant, previousTenant) => {
120+
if (updatedTenant.id !== previousTenant.id) {
121+
getCubeToken();
122+
}
123+
}, {
124+
deep: true,
125+
immediate: true,
126+
});
118127
</script>
119128

120129
<style lang="scss" scoped>

0 commit comments

Comments
 (0)