Skip to content

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

chore: remove dead code from exploration

Scott Wilson6f7e2638243d
diff --git a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx
index 6311267a39..64066957c2 100644
--- a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx
+++ b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx
@@ -55,47 +55,6 @@ export const ProjectIdentityAuthenticationSection = ({ identity, refetchIdentity
const hasAuthMethods = Boolean(identity.authMethods.length);
- const { mutateAsync: revokeUniversalAuth } = useDeleteIdentityUniversalAuth();
- const { mutateAsync: revokeTokenAuth } = useDeleteIdentityTokenAuth();
- const { mutateAsync: revokeKubernetesAuth } = useDeleteIdentityKubernetesAuth();
- const { mutateAsync: revokeGcpAuth } = useDeleteIdentityGcpAuth();
- const { mutateAsync: revokeTlsCertAuth } = useDeleteIdentityTlsCertAuth();
- const { mutateAsync: revokeAwsAuth } = useDeleteIdentityAwsAuth();
- const { mutateAsync: revokeAzureAuth } = useDeleteIdentityAzureAuth();
- const { mutateAsync: revokeAliCloudAuth } = useDeleteIdentityAliCloudAuth();
- const { mutateAsync: revokeOciAuth } = useDeleteIdentityOciAuth();
- const { mutateAsync: revokeOidcAuth } = useDeleteIdentityOidcAuth();
- const { mutateAsync: revokeJwtAuth } = useDeleteIdentityJwtAuth();
- const { mutateAsync: revokeLdapAuth } = useDeleteIdentityLdapAuth();
-
- const RemoveAuthMap = {
- [IdentityAuthMethod.KUBERNETES_AUTH]: revokeKubernetesAuth,
- [IdentityAuthMethod.GCP_AUTH]: revokeGcpAuth,
- [IdentityAuthMethod.TLS_CERT_AUTH]: revokeTlsCertAuth,
- [IdentityAuthMethod.AWS_AUTH]: revokeAwsAuth,
- [IdentityAuthMethod.AZURE_AUTH]: revokeAzureAuth,
- [IdentityAuthMethod.ALICLOUD_AUTH]: revokeAliCloudAuth,
- [IdentityAuthMethod.UNIVERSAL_AUTH]: revokeUniversalAuth,
- [IdentityAuthMethod.TOKEN_AUTH]: revokeTokenAuth,
- [IdentityAuthMethod.OCI_AUTH]: revokeOciAuth,
- [IdentityAuthMethod.OIDC_AUTH]: revokeOidcAuth,
- [IdentityAuthMethod.JWT_AUTH]: revokeJwtAuth,
- [IdentityAuthMethod.LDAP_AUTH]: revokeLdapAuth
- };
-
- const handleDeleteAuthMethod = async (authMethod: IdentityAuthMethod) => {
- await RemoveAuthMap[authMethod]({
- identityId: identity.id,
- projectId: identity.projectId!
- });
-
- createNotification({
- text: "Successfully removed auth method",
- type: "success"
- });
- handlePopUpToggle("revokeAuthMethod", false);
- };
-
return (
<>
<UnstableCard>
@@ -194,16 +153,6 @@ export const ProjectIdentityAuthenticationSection = ({ identity, refetchIdentity
text={(popUp.upgradePlan?.data as { description: string })?.description}
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
/>
- <DeleteActionModal
- isOpen={popUp?.revokeAuthMethod?.isOpen}
- title={`Are you sure you want to remove ${popUp?.revokeAuthMethod?.data ? identityAuthToNameMap[popUp.revokeAuthMethod.data as IdentityAuthMethod] : "this auth method"} on this identity?`}
- onChange={(isOpen) => handlePopUpToggle("revokeAuthMethod", isOpen)}
- deleteKey="confirm"
- buttonText="Remove"
- onDeleteApproved={() =>
- handleDeleteAuthMethod(popUp.revokeAuthMethod.data as IdentityAuthMethod)
- }
- />
</>
);
};