Skip to content

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

fix: fix project identity wizard not resetting on close

Scott Wilson3c79ffb16cfc
diff --git a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
index a72f1ca0f0..56d03e6fc5 100644
--- a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
@@ -543,7 +543,12 @@ export const IdentityTab = withProjectPermission(
animate={{ opacity: 1, translateX: 0 }}
exit={{ opacity: 0, translateX: -30 }}
>
- <ProjectIdentityModal onClose={() => handlePopUpClose("createIdentity")} />
+ <ProjectIdentityModal
+ onClose={() => {
+ handlePopUpClose("createIdentity");
+ setWizardStep(WizardSteps.SelectAction);
+ }}
+ />
</motion.div>
)}
{wizardStep === WizardSteps.LinkIdentity && (
diff --git a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx
index e44461031b..327144733b 100644
--- a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal.tsx
@@ -13,6 +13,7 @@ import {
FormLabel,
IconButton,
Input,
+ ModalClose,
Switch
} from "@app/components/v2";
import { useProject } from "@app/context";
@@ -280,9 +281,11 @@ export const ProjectIdentityModal = ({ onClose, identity }: ContentProps) => {
>
{isUpdate ? "Update" : "Create"}
</Button>
- <Button colorSchema="secondary" variant="plain" onClick={() => onClose()}>
- Cancel
- </Button>
+ <ModalClose asChild>
+ <Button colorSchema="secondary" variant="plain">
+ Cancel
+ </Button>
+ </ModalClose>
</div>
</form>
);