Skip to content

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

fix: added account locked prompt to sso signin flow

Sheen Capadngan0371a5754832
diff --git a/frontend/src/views/Login/components/PasswordStep/PasswordStep.tsx b/frontend/src/views/Login/components/PasswordStep/PasswordStep.tsx
index f9b086f6d9..1cdb1f5138 100644
--- a/frontend/src/views/Login/components/PasswordStep/PasswordStep.tsx
+++ b/frontend/src/views/Login/components/PasswordStep/PasswordStep.tsx
@@ -31,7 +31,6 @@ export const PasswordStep = ({
setPassword,
setStep
}: Props) => {
-
const [isLoading, setIsLoading] = useState(false);
const { t } = useTranslation();
const router = useRouter();
@@ -146,13 +145,24 @@ export const PasswordStep = ({
}
}
}
- } catch (err) {
+ } catch (err: any) {
setIsLoading(false);
+ console.error(err);
+
+ if (err.response.data.error === "User Locked") {
+ createNotification({
+ title: err.response.data.error,
+ text: err.response.data.message,
+ type: "error"
+ });
+ setIsLoading(false);
+ return;
+ }
+
createNotification({
text: "Login unsuccessful. Double-check your master password and try again.",
type: "error"
});
- console.error(err);
}
};