Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

security: upgrade next-auth (#4690)

Max Deichmannebe0c034fdf9
diff --git a/ee/package.json b/ee/package.json
index 8721a89113..91b1bc80f9 100644
--- a/ee/package.json
+++ b/ee/package.json
@@ -28,7 +28,7 @@
"@opentelemetry/api": ">=1.0.0 <1.10.0",
"axios": "^1.7.7",
"next": "^14.2.15",
- "next-auth": "^4.24.7",
+ "next-auth": "^4.24.11",
"zod": "^3.23.8"
},
"devDependencies": {
diff --git a/package.json b/package.json
index ac346ee130..6f89d032f6 100644
--- a/package.json
+++ b/package.json
@@ -81,10 +81,10 @@
}
}
},
+ "packageManager": "[email protected]",
"pnpm": {
"overrides": {
"jsonpath-plus": "10.0.7"
}
- },
- "packageManager": "[email protected]"
+ }
}
diff --git a/packages/shared/package.json b/packages/shared/package.json
index 7ae0efe954..7f3c76a783 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -82,7 +82,7 @@
"langchain": "^0.3.6",
"langfuse-langchain": "3.30.3",
"lodash": "^4.17.21",
- "next-auth": "^4.24.7",
+ "next-auth": "^4.24.11",
"nodemailer": "^6.9.15",
"prisma-extension-kysely": "^2.1.0",
"uuid": "^9.0.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 606f242bde..a22c7c5b9d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -48,8 +48,8 @@ importers:
specifier: ^14.2.15
next-auth:
- specifier: ^4.24.7
+ specifier: ^4.24.11
zod:
specifier: ^3.23.8
version: 3.23.8
@@ -210,8 +210,8 @@ importers:
specifier: ^4.17.21
version: 4.17.21
next-auth:
- specifier: ^4.24.7
+ specifier: ^4.24.11
nodemailer:
specifier: ^6.9.15
version: 6.9.15
@@ -368,7 +368,7 @@ importers:
'@next-auth/prisma-adapter':
specifier: ^1.0.7
'@opentelemetry/api':
specifier: ^1.9.0
version: 1.9.0
@@ -592,8 +592,8 @@ importers:
specifier: ^14.2.15
next-auth:
- specifier: ^4.24.7
+ specifier: ^4.24.11
next-query-params:
specifier: ^5.0.1
@@ -6050,10 +6050,6 @@ packages:
resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==}
- resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
- engines: {node: '>= 0.6'}
-
resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==}
engines: {node: '>= 0.6'}
@@ -9012,14 +9008,17 @@ packages:
resolution: {integrity: sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
- resolution: {integrity: sha512-iChjE8ov/1K/z98gdKbn2Jw+2vLgJtVV39X+rCP5SGnVQuco7QOr19FRNGMIrD8d3LYhHWV9j9sKLzq1aDWWQQ==}
+ resolution: {integrity: sha512-pCFXzIDQX7xmHFs4KVH4luCjaCbuPRtZ9oBUjUhOk84mZ9WVPf94n87TxYI4rSRf9HmfHEF8Yep3JrYDVOo3Cw==}
peerDependencies:
- next: ^12.2.5 || ^13 || ^14
+ '@auth/core': 0.34.2
+ next: ^12.2.5 || ^13 || ^14 || ^15
nodemailer: ^6.6.5
- react: ^17.0.2 || ^18
- react-dom: ^17.0.2 || ^18
+ react: ^17.0.2 || ^18 || ^19
+ react-dom: ^17.0.2 || ^18 || ^19
peerDependenciesMeta:
+ '@auth/core':
+ optional: true
nodemailer:
optional: true
@@ -14330,10 +14329,10 @@ snapshots:
transitivePeerDependencies:
- '@types/react'
dependencies:
'@prisma/client': 5.22.0([email protected])
'@next/[email protected]': {}
@@ -15796,7 +15795,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.25.7
+ '@babel/runtime': 7.26.0
react: 18.2.0
optionalDependencies:
'@types/react': 18.2.79
@@ -15824,7 +15823,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.25.7
+ '@babel/runtime': 7.26.0
'@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])
react: 18.2.0
optionalDependencies:
@@ -15839,7 +15838,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.25.7
+ '@babel/runtime': 7.26.0
react: 18.2.0
optionalDependencies:
'@types/react': 18.2.79
@@ -18477,8 +18476,6 @@ snapshots:
-
@@ -22305,11 +22302,11 @@ snapshots:
dependencies:
type-fest: 2.19.0
dependencies:
- '@babel/runtime': 7.24.5
+ '@babel/runtime': 7.26.0
'@panva/hkdf': 1.1.1
- cookie: 0.5.0
+ cookie: 0.7.2
jose: 4.15.5
oauth: 0.9.15
diff --git a/web/package.json b/web/package.json
index e645dd0f53..7ba202b0e1 100644
--- a/web/package.json
+++ b/web/package.json
@@ -118,7 +118,7 @@
"lodash": "^4.17.21",
"lucide-react": "^0.462.0",
"next": "^14.2.15",
- "next-auth": "^4.24.7",
+ "next-auth": "^4.24.11",
"next-query-params": "^5.0.1",
"next-themes": "^0.3.0",
"posthog-js": "^1.176.0",
diff --git a/web/src/server/auth.ts b/web/src/server/auth.ts
index 3e12ca6f53..633dfa6642 100644
--- a/web/src/server/auth.ts
+++ b/web/src/server/auth.ts
@@ -11,7 +11,11 @@ import { verifyPassword } from "@/src/features/auth-credentials/lib/credentialsS
import { parseFlags } from "@/src/features/feature-flags/utils";
import { env } from "@/src/env.mjs";
import { createProjectMembershipsOnSignup } from "@/src/features/auth/lib/createProjectMembershipsOnSignup";
-import { type Adapter } from "next-auth/adapters";
+import {
+ type AdapterUser,
+ type Adapter,
+ type AdapterAccount,
+} from "next-auth/adapters";
// Providers
import CredentialsProvider from "next-auth/providers/credentials";
@@ -315,7 +319,7 @@ if (
const prismaAdapter = PrismaAdapter(prisma);
const extendedPrismaAdapter: Adapter = {
...prismaAdapter,
- async createUser(profile) {
+ async createUser(profile: Omit<AdapterUser, "id">) {
if (!prismaAdapter.createUser)
throw new Error("createUser not implemented");
if (
@@ -338,7 +342,7 @@ const extendedPrismaAdapter: Adapter = {
return user;
},
- async linkAccount(data) {
+ async linkAccount(data: AdapterAccount) {
if (!prismaAdapter.linkAccount)
throw new Error("NextAuth: prismaAdapter.linkAccount not implemented");