Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(auth): refine query invalidation on organization selection success

Victor Hugo dos Santose779b346cb02
diff --git a/frontend/src/hooks/api/auth/queries.tsx b/frontend/src/hooks/api/auth/queries.tsx
index 6f0ce35a07..42d5e145b2 100644
--- a/frontend/src/hooks/api/auth/queries.tsx
+++ b/frontend/src/hooks/api/auth/queries.tsx
@@ -104,9 +104,8 @@ export const useSelectOrganization = () => {
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: authKeys.getAuthToken });
- queryClient.invalidateQueries({
- queryKey: [organizationKeys.getUserOrganizations, projectKeys.getAllUserProjects]
- });
+ queryClient.invalidateQueries({ queryKey: organizationKeys.getUserOrganizations });
+ queryClient.invalidateQueries({ queryKey: projectKeys.getAllUserProjects() });
}
});
};