mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
Merge pull request #3527 from Infisical/misc/addressed-totp-visibility-issue
misc: addressed totp and sms visibility issue
This commit is contained in:
@@ -31,6 +31,25 @@ const codeInputProps = {
|
|||||||
}
|
}
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
const codeInputPropsPhone = {
|
||||||
|
inputStyle: {
|
||||||
|
fontFamily: "monospace",
|
||||||
|
margin: "4px",
|
||||||
|
MozAppearance: "textfield",
|
||||||
|
width: "40px",
|
||||||
|
borderRadius: "5px",
|
||||||
|
fontSize: "24px",
|
||||||
|
height: "40px",
|
||||||
|
paddingLeft: "7",
|
||||||
|
backgroundColor: "#0d1117",
|
||||||
|
color: "white",
|
||||||
|
border: "1px solid #2d2f33",
|
||||||
|
textAlign: "center",
|
||||||
|
outlineColor: "#8ca542",
|
||||||
|
borderColor: "#2d2f33"
|
||||||
|
}
|
||||||
|
} as const;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
successCallback: () => void | Promise<void>;
|
successCallback: () => void | Promise<void>;
|
||||||
closeMfa?: () => void;
|
closeMfa?: () => void;
|
||||||
@@ -172,6 +191,24 @@ export const Mfa = ({ successCallback, closeMfa, hideLogo, email, method }: Prop
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="mx-auto mt-4 block w-max min-w-[18rem] md:hidden">
|
||||||
|
{method === MfaMethod.EMAIL && (
|
||||||
|
<ReactCodeInput
|
||||||
|
name=""
|
||||||
|
inputMode="tel"
|
||||||
|
type="text"
|
||||||
|
fields={6}
|
||||||
|
onChange={setMfaCode}
|
||||||
|
className="mb-2 mt-2"
|
||||||
|
{...codeInputPropsPhone}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{method === MfaMethod.TOTP && (
|
||||||
|
<div className="mb-4 mt-2">
|
||||||
|
<Input value={mfaCode} onChange={(e) => setMfaCode(e.target.value)} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{typeof triesLeft === "number" && (
|
{typeof triesLeft === "number" && (
|
||||||
<Error text={`Invalid code. You have ${triesLeft} attempt(s) remaining.`} />
|
<Error text={`Invalid code. You have ${triesLeft} attempt(s) remaining.`} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -97,7 +97,11 @@ export const Route = createFileRoute("/_restrict-login-signup")({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!data.organizationId) {
|
if (!data.organizationId) {
|
||||||
if (location.pathname.endsWith("select-organization")) return;
|
if (
|
||||||
|
location.pathname.endsWith("select-organization") ||
|
||||||
|
location.pathname.endsWith("verify-email")
|
||||||
|
)
|
||||||
|
return;
|
||||||
throw redirect({ to: "/login/select-organization" });
|
throw redirect({ to: "/login/select-organization" });
|
||||||
}
|
}
|
||||||
throw redirect({
|
throw redirect({
|
||||||
|
|||||||
Reference in New Issue
Block a user