Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
chore(auth): remove unnecessary comments
Igor Correa12b87b4d0aac
diff --git a/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx b/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsxindex 980b61b59b..7b923acb85 100644--- a/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx+++ b/frontend/src/pages/auth/LoginPage/components/PasswordStep/PasswordStep.tsx@@ -62,19 +62,14 @@ export const PasswordStep = ({providerAuthToken});- // unset provider auth token in case it was usedSecurityClient.setProviderAuthToken("");- // set JWT tokenSecurityClient.setToken(oauthLogin.token);- // For CLI login, always navigate to the org selector so the user can pick- // which sub-organization to log into, regardless of organizationId in the token.if (callbackPort) {navigateToSelectOrganization(callbackPort, isAdminLogin);return;}- // Check for duplicate accounts before showing the selectorif (organizationId) {const userDuplicateAccount = await fetchUserDuplicateAccounts();const hasDuplicate = userDuplicateAccount?.length > 1;@@ -84,18 +79,11 @@ export const PasswordStep = ({}}- // Navigate to the org selector — do NOT call selectOrganization here.- // Calling selectOrganization would set an org-scoped JWT, which causes the- // _restrict-login-signup middleware to redirect straight to the org dashboard,- // bypassing the sub-org selector entirely.const userOrgs = await fetchOrganizations();- // case: user has orgs, so we navigate the user to select an orgif (userOrgs.length > 0) {navigateToSelectOrganization(undefined, isAdminLogin);- }- // case: no orgs found, so we navigate the user to create an org- else {+ } else {await navigateUserToOrg({ navigate });}} catch (err: any) {@@ -134,7 +122,6 @@ export const PasswordStep = ({setIsLoading(true);if (callbackPort) {- // attemptCliLoginconst isCliLoginSuccessful = await attemptCliLogin({email,password,diff --git a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsxindex af18103864..18c8c576d2 100644--- a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx+++ b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx@@ -54,11 +54,9 @@ export const SelectOrganizationSection = () => {const mfaPending = queryParams.get("mfa_pending") === "true";const defaultSelectedOrg = organizations.data?.find((org) => org.id === orgId);- // True when we should auto-select defaultSelectedOrg and bypass the selector UI:- // only when there's no CLI callbackPort AND the org has no sub-orgs to choose from.const willAutoSelectDefaultOrg = useMemo(() => {if (!defaultSelectedOrg || callbackPort) return false;- if (orgsWithSubOrgs.isPending) return true; // still loading — keep spinner+ if (orgsWithSubOrgs.isPending) return true;const orgEntry = orgsWithSubOrgs.data?.find((o) => o.id === defaultSelectedOrg.id);return (orgEntry?.subOrganizations.length ?? 0) === 0;}, [defaultSelectedOrg, callbackPort, orgsWithSubOrgs.isPending, orgsWithSubOrgs.data]);