Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Update IdentityModal.tsx
Daniel Hougaard3cb150a74904
diff --git a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityModal.tsx b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityModal.tsxindex 6f582a96f9..f738bd2072 100644--- a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityModal.tsx+++ b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityModal.tsx@@ -15,7 +15,7 @@ import {} from "@app/components/v2";import { useOrganization } from "@app/context";import { useCreateIdentity, useGetOrgRoles, useUpdateIdentity } from "@app/hooks/api";-import { IdentityAuthMethod } from "@app/hooks/api/identities";+import { IdentityAuthMethod, useAddIdentityUniversalAuth } from "@app/hooks/api/identities";import { UsePopUpState } from "@app/hooks/usePopUp";const schema = yup@@ -40,7 +40,7 @@ type Props = {handlePopUpToggle: (popUpName: keyof UsePopUpState<["identity"]>, state?: boolean) => void;};-export const IdentityModal = ({ popUp, handlePopUpOpen, handlePopUpToggle }: Props) => {+export const IdentityModal = ({ popUp, /* handlePopUpOpen, */ handlePopUpToggle }: Props) => {const { createNotification } = useNotificationContext();const { currentOrg } = useOrganization();@@ -50,6 +50,7 @@ export const IdentityModal = ({ popUp, handlePopUpOpen, handlePopUpToggle }: Proconst { mutateAsync: createMutateAsync } = useCreateIdentity();const { mutateAsync: updateMutateAsync } = useUpdateIdentity();+ const { mutateAsync: addMutateAsync } = useAddIdentityUniversalAuth();const {control,@@ -112,21 +113,31 @@ export const IdentityModal = ({ popUp, handlePopUpOpen, handlePopUpToggle }: Pro// createconst {- id: createdId,- name: createdName,- authMethod+ id: createdId+ // name: createdName,+ // authMethod} = await createMutateAsync({name,role: role || undefined,organizationId: orgId});- handlePopUpToggle("identity", false);- handlePopUpOpen("identityAuthMethod", {+ await addMutateAsync({+ organizationId: orgId,identityId: createdId,- name: createdName,- authMethod+ clientSecretTrustedIps: [{ ipAddress: "0.0.0.0/0" }, { ipAddress: "::/0" }],+ accessTokenTrustedIps: [{ ipAddress: "0.0.0.0/0" }, { ipAddress: "::/0" }],+ accessTokenTTL: 2592000,+ accessTokenMaxTTL: 2592000,+ accessTokenNumUsesLimit: 0});++ handlePopUpToggle("identity", false);+ // handlePopUpOpen("identityAuthMethod", {+ // identityId: createdId,+ // name: createdName,+ // authMethod+ // });}createNotification({