mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 11:27:32 +00:00
misc: removed remaining mfa handling
This commit is contained in:
@@ -30,7 +30,6 @@ export const LoginSSO = ({ providerAuthToken }: Props) => {
|
|||||||
email={username}
|
email={username}
|
||||||
password={password}
|
password={password}
|
||||||
setPassword={setPassword}
|
setPassword={setPassword}
|
||||||
setStep={setStep}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -102,17 +102,7 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }:
|
|||||||
|
|
||||||
if (isLoginSuccessful && isLoginSuccessful.success) {
|
if (isLoginSuccessful && isLoginSuccessful.success) {
|
||||||
// case: login was successful
|
// case: login was successful
|
||||||
|
|
||||||
if (isLoginSuccessful.mfaEnabled) {
|
|
||||||
// case: login requires MFA step
|
|
||||||
setStep(1);
|
|
||||||
setIsLoading(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
navigateToSelectOrganization();
|
navigateToSelectOrganization();
|
||||||
|
|
||||||
// case: login does not require MFA step
|
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Successfully logged in",
|
text: "Successfully logged in",
|
||||||
type: "success"
|
type: "success"
|
||||||
|
|||||||
@@ -27,16 +27,9 @@ type Props = {
|
|||||||
email: string;
|
email: string;
|
||||||
password: string;
|
password: string;
|
||||||
setPassword: (password: string) => void;
|
setPassword: (password: string) => void;
|
||||||
setStep: (step: number) => void;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PasswordStep = ({
|
export const PasswordStep = ({ providerAuthToken, email, password, setPassword }: Props) => {
|
||||||
providerAuthToken,
|
|
||||||
email,
|
|
||||||
password,
|
|
||||||
setPassword,
|
|
||||||
setStep
|
|
||||||
}: Props) => {
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -169,12 +162,6 @@ export const PasswordStep = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (isCliLoginSuccessful && isCliLoginSuccessful.success) {
|
if (isCliLoginSuccessful && isCliLoginSuccessful.success) {
|
||||||
if (isCliLoginSuccessful.mfaEnabled) {
|
|
||||||
// case: login requires MFA step
|
|
||||||
setStep(2);
|
|
||||||
setIsLoading(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const cliUrl = `http://127.0.0.1:${callbackPort}/`;
|
const cliUrl = `http://127.0.0.1:${callbackPort}/`;
|
||||||
|
|
||||||
// case: organization ID is present from the provider auth token -- select the org and use the new jwt token in the CLI, then navigate to the org
|
// case: organization ID is present from the provider auth token -- select the org and use the new jwt token in the CLI, then navigate to the org
|
||||||
@@ -237,16 +224,6 @@ export const PasswordStep = ({
|
|||||||
|
|
||||||
if (loginAttempt && loginAttempt.success) {
|
if (loginAttempt && loginAttempt.success) {
|
||||||
// case: login was successful
|
// case: login was successful
|
||||||
|
|
||||||
if (loginAttempt.mfaEnabled) {
|
|
||||||
// TODO: deal with MFA
|
|
||||||
// case: login requires MFA step
|
|
||||||
setIsLoading(false);
|
|
||||||
setStep(2);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// case: login does not require MFA step
|
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Successfully logged in",
|
text: "Successfully logged in",
|
||||||
|
|||||||
Reference in New Issue
Block a user