From e6c053066e8f7bf5e021562e9bf0589cde2daecb Mon Sep 17 00:00:00 2001 From: Prateek Surana Date: Fri, 12 Apr 2024 14:07:12 +0530 Subject: [PATCH] Revert error on success in login methods --- .../components/tenants/tenantDetail/LoginMethodsSection.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/components/tenants/tenantDetail/LoginMethodsSection.tsx b/src/ui/components/tenants/tenantDetail/LoginMethodsSection.tsx index be2c7522..77be2d28 100644 --- a/src/ui/components/tenants/tenantDetail/LoginMethodsSection.tsx +++ b/src/ui/components/tenants/tenantDetail/LoginMethodsSection.tsx @@ -159,6 +159,8 @@ const LoginFactor = ({ } else { throw new Error(res.status); } + } else { + setError(null); } } else { const res = await updateSecondaryFactors(tenantInfo.tenantId, id, !doesFactorExist); @@ -170,6 +172,8 @@ const LoginFactor = ({ } else { throw new Error(res.status); } + } else { + setError(null); } if (res.status === "OK" && res.isMFARequirementsForAuthOverridden) {