Skip to content

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

fix(auth): release recovery-code confirmation pending after organization selection (#8620)

Andrew Huang1749047931f8
diff --git a/frontend/src/components/auth/Mfa.tsx b/frontend/src/components/auth/Mfa.tsx
index eb7f591521..5d79803274 100644
--- a/frontend/src/components/auth/Mfa.tsx
+++ b/frontend/src/components/auth/Mfa.tsx
@@ -303,7 +303,11 @@ export const Mfa = ({ successCallback, closeMfa, email, method, onChangeAccount
labelClassName: "text-foreground-soft",
onConfirm: async () => {
setIsLoading(true);
- await completeLogin();
+ try {
+ await completeLogin();
+ } finally {
+ setIsLoading(false);
+ }
}
}}
/>
diff --git a/frontend/src/pages/auth/SelectOrgPage/SelectOrgPage.tsx b/frontend/src/pages/auth/SelectOrgPage/SelectOrgPage.tsx
index e6957e4e89..46f18abfd6 100644
--- a/frontend/src/pages/auth/SelectOrgPage/SelectOrgPage.tsx
+++ b/frontend/src/pages/auth/SelectOrgPage/SelectOrgPage.tsx
@@ -463,8 +463,12 @@ export const SelectOrgPage = () => {
email={user.email as string}
successCallback={() => {
if (mfaOrgInfo.current) {
- handleSelectOrganization(mfaOrgInfo.current.rootOrg, mfaOrgInfo.current.subOrgId);
+ return handleSelectOrganization(
+ mfaOrgInfo.current.rootOrg,
+ mfaOrgInfo.current.subOrgId
+ );
}
+ return undefined;
}}
method={requiredMfaMethod as MfaMethod}
onChangeAccount={handleLogout}