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
Correct SSO linking case and uncomment audit logs v2
Tuan Dang5ac18163922f
diff --git a/backend/src/controllers/v3/authController.ts b/backend/src/controllers/v3/authController.tsindex ebbcb61b22..413bcefa0f 100644--- a/backend/src/controllers/v3/authController.ts+++ b/backend/src/controllers/v3/authController.ts@@ -47,17 +47,16 @@ export const login1 = async (req: Request, res: Response) => {clientPublicKey: string,providerAuthToken?: string;} = req.body;-+const user = await User.findOne({email,}).select("+salt +verifier");if (!user) throw new Error("Failed to find user");-+if (!user.authMethods.includes(AuthMethod.EMAIL)) {await validateProviderAuthToken({email,- user,providerAuthToken,});}@@ -109,7 +108,6 @@ export const login2 = async (req: Request, res: Response) => {if (!user.authMethods.includes(AuthMethod.EMAIL)) {await validateProviderAuthToken({email,- user,providerAuthToken,})}diff --git a/backend/src/helpers/auth.ts b/backend/src/helpers/auth.tsindex f24c548598..74094cba69 100644--- a/backend/src/helpers/auth.ts+++ b/backend/src/helpers/auth.ts@@ -392,11 +392,9 @@ export const createToken = ({export const validateProviderAuthToken = async ({email,- user,providerAuthToken,}: {email: string;- user: IUser,providerAuthToken?: string;}) => {if (!providerAuthToken) {@@ -407,10 +405,7 @@ export const validateProviderAuthToken = async ({jwt.verify(providerAuthToken, await getJwtProviderAuthSecret()));- if (- !user.authMethods.includes(decodedToken.authMethod) ||- decodedToken.email !== email- ) {+ if (decodedToken.email !== email) {throw new Error("Invalid authentication credentials.")}}diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsxindex bb08e849d8..1391fe2982 100644--- a/frontend/src/layouts/AppLayout/AppLayout.tsx+++ b/frontend/src/layouts/AppLayout/AppLayout.tsx@@ -483,7 +483,7 @@ export const AppLayout = ({ children }: LayoutProps) => {</MenuItem></a></Link>- {/* <Link href={`/project/${currentWorkspace?._id}/audit-logs`} passHref>+ <Link href={`/project/${currentWorkspace?._id}/audit-logs`} passHref><a><MenuItemisSelected={@@ -491,11 +491,11 @@ export const AppLayout = ({ children }: LayoutProps) => {}icon="system-outline-168-view-headline">- Audit Logs V2+ Audit Logs</MenuItem></a>- </Link> */}- <Link href={`/project/${currentWorkspace?._id}/logs`} passHref>+ </Link>+ {/* <Link href={`/project/${currentWorkspace?._id}/logs`} passHref><a><MenuItemisSelected={@@ -506,7 +506,7 @@ export const AppLayout = ({ children }: LayoutProps) => {Audit Logs</MenuItem></a>- </Link>+ </Link> */}{/* <Link href={`/project/${currentWorkspace?._id}/secret-scanning`} passHref><a><MenuItemdiff --git a/frontend/src/pages/project/[id]/audit-logs/index.tsx b/frontend/src/pages/project/[id]/audit-logs/index.tsxindex c44c3ac181..3fb43de4e1 100644--- a/frontend/src/pages/project/[id]/audit-logs/index.tsx+++ b/frontend/src/pages/project/[id]/audit-logs/index.tsx@@ -9,7 +9,7 @@ const Logs = () => {return (<div className="h-full bg-bunker-800"><Head>- <title>{t("common.head-title", { title: t("billing.title") })}</title>+ <title>{t("common.head-title", { title: t("settings.project.title") })}</title><link rel="icon" href="/infisical.ico" /><meta property="og:image" content="/images/message.png" /></Head>