Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: remove initial idp list in global state (#6067)

boojack77dd5205ca3d
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 6421646039..2533698027 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -18,7 +18,6 @@ import {
pushNotification,
useActuatorStore,
useAuthStore,
- useIdentityProviderStore,
useSubscriptionStore,
} from "./store";
import {
@@ -165,11 +164,6 @@ const initFeatureMatrix = () => {
const subscriptionStore = useSubscriptionStore();
return subscriptionStore.fetchFeatureMatrix();
};
-// Initial identity providers to provide sso options in signin page and user's related domain name.
-const initIdentityProvider = () => {
- const idpStore = useIdentityProviderStore();
- return idpStore.fetchIdentityProviderList();
-};
const restoreUser = () => {
const authStore = useAuthStore();
return authStore.restoreUser();
@@ -178,7 +172,6 @@ Promise.all([
initActuator(),
initFeatureMatrix(),
initSubscription(),
- initIdentityProvider(),
restoreUser(),
]).finally(() => {
// Install router after the necessary data fetching is complete.
diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vue
index 2ea3ba0dcb..1aefde1c0e 100644
--- a/frontend/src/views/SettingWorkspaceSSO.vue
+++ b/frontend/src/views/SettingWorkspaceSSO.vue
@@ -92,7 +92,7 @@
</template>
<script lang="ts" setup>
-import { computed, reactive } from "vue";
+import { computed, onMounted, reactive } from "vue";
import { useRouter } from "vue-router";
import { useIdentityProviderStore } from "@/store/modules/idp";
import { IdentityProvider } from "@/types/proto/v1/idp_service";
@@ -118,6 +118,10 @@ const identityProviderList = computed(() => {
return identityProviderStore.identityProviderList;
});
+onMounted(() => {
+ identityProviderStore.fetchIdentityProviderList();
+});
+
const handleCreateSSO = () => {
if (!hasSSOFeature.value) {
state.showFeatureModal = true;