Skip to content

The open-source app everyone uses to manage agents at work

build(deps): bump better-auth from 1.4.18 to 1.6.20 (#8464)

dependabot[bot]72d4f2ad9943
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index eee83e0a0f..6c08c89020 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -30,7 +30,7 @@ importers:
version: 5.9.3
vitest:
specifier: ^4.1.8
cli:
dependencies:
@@ -87,7 +87,7 @@ importers:
version: 17.3.1
drizzle-orm:
specifier: 0.45.2
embedded-postgres:
specifier: ^18.1.0-beta.16
version: 18.1.0-beta.16(patch_hash=55uhvnotpqyiy37rn3pqpukhei)
@@ -299,7 +299,7 @@ importers:
version: link:../shared
drizzle-orm:
specifier: ^0.45.2
embedded-postgres:
specifier: ^18.1.0-beta.16
version: 18.1.0-beta.16(patch_hash=55uhvnotpqyiy37rn3pqpukhei)
@@ -321,7 +321,7 @@ importers:
version: 5.9.3
vitest:
specifier: ^4.1.8
packages/mcp-server:
dependencies:
@@ -343,7 +343,7 @@ importers:
version: 5.9.3
vitest:
specifier: ^4.1.8
packages/plugins/create-paperclip-plugin:
dependencies:
@@ -393,7 +393,7 @@ importers:
version: 5.9.3
vitest:
specifier: ^4.1.8
packages/plugins/examples/plugin-file-browser-example:
dependencies:
@@ -511,7 +511,7 @@ importers:
version: 5.9.3
vitest:
specifier: ^4.1.8
packages/plugins/plugin-llm-wiki:
dependencies:
@@ -554,7 +554,7 @@ importers:
version: 5.9.3
vitest:
specifier: ^4.1.8
packages/plugins/plugin-workspace-diff:
dependencies:
@@ -588,7 +588,7 @@ importers:
version: 5.9.3
vitest:
specifier: ^4.1.8
packages/plugins/sdk:
dependencies:
@@ -698,8 +698,8 @@ importers:
specifier: ^3.0.1
version: 3.0.1([email protected])
better-auth:
- specifier: 1.4.18
+ specifier: 1.6.20
chokidar:
specifier: ^4.0.3
version: 4.0.3
@@ -714,7 +714,7 @@ importers:
version: 17.3.1
drizzle-orm:
specifier: ^0.45.2
embedded-postgres:
specifier: ^18.1.0-beta.16
version: 18.1.0-beta.16(patch_hash=55uhvnotpqyiy37rn3pqpukhei)
@@ -726,7 +726,7 @@ importers:
version: 0.3.0
jsdom:
specifier: ^28.1.0
- version: 28.1.0(@noble/[email protected])
+ version: 28.1.0(@noble/[email protected])
multer:
specifier: ^2.1.1
version: 2.1.1
@@ -793,7 +793,7 @@ importers:
vitest:
specifier: ^4.1.8
ui:
dependencies:
@@ -947,7 +947,7 @@ importers:
vitest:
specifier: ^4.1.8
packages:
@@ -1355,26 +1355,84 @@ packages:
resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==}
engines: {node: '>=6.9.0'}
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-q+awYgC7nkLEBdx2sW0iJjkzgSHlIxGnOpsN1r/O1+a4m7osJNHtfK2mKJSL1I+GfNyIlxJF8WvD/NLuYMpmcg==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-y73I1xNXuNYiHBFduWGRcJ2ro2rNuVDEYkgVMJtIaRXtbosdXHs9gfyQrHecgeHMHKx1SYSBT/CExak0vVMTng==}
peerDependencies:
- '@better-auth/utils': 0.3.0
- '@better-fetch/fetch': 1.1.21
- better-call: 1.1.8
+ '@better-auth/utils': 0.4.2
+ '@better-fetch/fetch': 1.3.1
+ '@cloudflare/workers-types': '>=4'
+ '@opentelemetry/api': ^1.9.0
+ better-call: 1.3.6
jose: ^6.1.0
- kysely: ^0.28.5
+ kysely: ^0.28.5 || ^0.29.0
nanostores: ^1.0.1
+ peerDependenciesMeta:
+ '@cloudflare/workers-types':
+ optional: true
+ '@opentelemetry/api':
+ optional: true
+
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-hJHfCdAiZrC7EmZAt3NAiGgcNo9Y5Qz3PLL+a9rODXaAJGCMvzUJniqef9wHuJBwU0SWW+2f4wXe8xQmaC/IKQ==}
+ peerDependencies:
+ '@better-auth/core': ^1.6.20
+ '@better-auth/utils': 0.4.2
+ drizzle-orm: ^0.45.2
+ peerDependenciesMeta:
+ drizzle-orm:
+ optional: true
+
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-Uvpmgbx5y8JqXroVanNzDdKzOl3HojoTz+/X6MR6zOUr25IzlYz660mjnu0rxKiIF55kD3CroqFsDzjNUw7ERw==}
+ peerDependencies:
+ '@better-auth/core': ^1.6.20
+ '@better-auth/utils': 0.4.2
+ kysely: ^0.28.17 || ^0.29.0
+ peerDependenciesMeta:
+ kysely:
+ optional: true
+
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-J5Ni0LlFijbzXlwu2rFHaD8zEFocmajyzWkRnHsq8LhV/Dk4iWQwwnqzLrPoDQEj8roECAUF03hrIeMzqWRqJQ==}
+ peerDependencies:
+ '@better-auth/core': ^1.6.20
+ '@better-auth/utils': 0.4.2
+
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-ClDBJf6h4g85WJswxwQwxLaiyRU67Gmz/uaIf19tY1gqlLJDykSGjmqRNSBMG5rWABNzcNqbO4KG31rYUldbIw==}
+ peerDependencies:
+ '@better-auth/core': ^1.6.20
+ '@better-auth/utils': 0.4.2
+ mongodb: ^6.0.0 || ^7.0.0
+ peerDependenciesMeta:
+ mongodb:
+ optional: true
+
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-WhYdhSGuVSfu1peCSf2snmmVzfWjRaEvbSrsNCusiwGE9l94HlES4mjSPM48fed24hL7yg4j1dYK/yjEt87FpQ==}
+ peerDependencies:
+ '@better-auth/core': ^1.6.20
+ '@better-auth/utils': 0.4.2
+ '@prisma/client': ^5.0.0 || ^6.0.0 || ^7.0.0
+ prisma: ^5.0.0 || ^6.0.0 || ^7.0.0
+ peerDependenciesMeta:
+ '@prisma/client':
+ optional: true
+ prisma:
+ optional: true
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-e5rDF8S4j3Um/0LIVATL2in9dL4lfO2fr2v1Wio4qTMRbfxqnUDTa+6SZtwdeJrbc4O+a3c+IyIpjG9Q/6GpfQ==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-3BhbY3naQDERvdJvJ7fGszVY6rpsVfc6c9uyBVZlC1coVEF/rkM0rIcjtMVI1GUH7vWy1wjR6qF5vQnMun3XNQ==}
peerDependencies:
- '@better-auth/core': 1.4.18
+ '@better-auth/core': ^1.6.20
+ '@better-auth/utils': 0.4.2
+ '@better-fetch/fetch': 1.3.1
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-W+Adw6ZA6mgvnSnhOki270rwJ42t4XzSK6YWGF//BbVXL6SwCLWfyzBc1lN2m/4RM28KubdBKQ4X5VMoLRNPQw==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-AUxrvu+HaaODsUyzDxFgwd/8RZ1yZaYo42LXKSrU2oGgR38pS1ij8nqQKNgtTWoYGpNevNXtCfgTy6loHveW9A==}
- '@better-fetch/[email protected]':
- resolution: {integrity: sha512-/ImESw0sskqlVR94jB+5+Pxjf+xBwDZF/N5+y2/q4EqD7IARUTSpPfIo8uf39SYpCxyOCtbyYpUrZ3F/k0zT4A==}
+ '@better-fetch/[email protected]':
+ resolution: {integrity: sha512-ABkD1WhyfPZprKRQI3bhATjeiFuNWC9PXhfGWqL+sg/gKrM977oFrYkdb4msM3hgUGonr7KlOsOFT5TU2rht9g==}
'@braintree/[email protected]':
resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==}
@@ -2692,16 +2750,16 @@ packages:
'@emnapi/core': ^1.7.1
'@emnapi/runtime': ^1.7.1
- '@noble/[email protected]':
- resolution: {integrity: sha512-bysYuiVfhxNJuldNXlFEitTVdNnYUc+XNJZd7Qm2a5j1vZHgY+fazadNFWFaMK/2vye0JVlxV3gHmC0WDfAOQw==}
+ '@noble/[email protected]':
+ resolution: {integrity: sha512-Z6pjIZ/8IJcCGzb2S/0Px5J81yij85xASuk1teLNeg75bfT07MV3a/O2Mtn1I2se43k3lkVEcFaR10N4cgQcZA==}
engines: {node: '>= 20.19.0'}
resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==}
engines: {node: ^14.21.3 || >=16}
- '@noble/[email protected]':
- resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==}
+ '@noble/[email protected]':
+ resolution: {integrity: sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==}
engines: {node: '>= 20.19.0'}
'@nodable/[email protected]':
@@ -2718,6 +2776,10 @@ packages:
'@open-draft/[email protected]':
resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==}
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-/UhIkaZgPutTFmQ7RnIJGgDXZmtEJ7Dvi86xNTFWcnRxVRNk/aotsqDJYeEvDP+FSMB2SdW+pQzNMcWP0rwuNA==}
+ engines: {node: '>=14'}
+
'@oxc-parser/[email protected]':
resolution: {integrity: sha512-0LC7ye4hvqbIKxAzThzvswgHLFu2AURKzYLeSVvLdu2TBOYWQDmHnTqPLeA597BcUCxiLqLsS4CJ5uoI5WYWCQ==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -4996,8 +5058,8 @@ packages:
resolution: {integrity: sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==}
hasBin: true
- resolution: {integrity: sha512-bnyifLWBPcYVltH3RhS7CM62MoelEqC6Q+GnZwfiDWNfepXoQZBjEvn4urcERC7NTKgKq5zNBM8rvPvRBa6xcg==}
+ resolution: {integrity: sha512-fSpGHGRKiGRiYVd3QTQtuVZ8oxpiSe/7ip0Rpvt/Sy8zQbEbVKUPMOhE0gLXg+FjqTUsIo7582hxUYxtEcqUpA==}
peerDependencies:
'@lynx-js/react': '*'
'@prisma/client': ^5.0.0 || ^6.0.0 || ^7.0.0
@@ -5006,7 +5068,7 @@ packages:
'@tanstack/solid-start': ^1.0.0
better-sqlite3: ^12.0.0
drizzle-kit: '>=0.31.4'
- drizzle-orm: '>=0.41.0'
+ drizzle-orm: ^0.45.2
mongodb: ^6.0.0 || ^7.0.0
mysql2: ^3.0.0
next: ^14.0.0 || ^15.0.0 || ^16.0.0
@@ -5058,8 +5120,8 @@ packages:
vue:
optional: true
- resolution: {integrity: sha512-XMQ2rs6FNXasGNfMjzbyroSwKwYbZ/T3IxruSS6U2MJRsSYh3wYtG3o6H00ZlKZ/C/UPOAD97tqgQJNsxyeTXw==}
+ resolution: {integrity: sha512-no1jI+h6Bkxs1NVBo4rONbVIzsPjZ8IUu7IHaJBiFwVX1XEQGN8KpHots5fSWmXe9nNyLuLIcgx6WEUcE6EDaA==}
peerDependencies:
zod: ^4.0.0
peerDependenciesMeta:
@@ -5547,8 +5609,8 @@ packages:
resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
+ resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==}
resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==}
@@ -6256,6 +6318,9 @@ packages:
resolution: {integrity: sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==}
+ resolution: {integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==}
+
resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==}
engines: {node: '>=10'}
@@ -6307,9 +6372,9 @@ packages:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'}
- resolution: {integrity: sha512-zpGIFg0HuoC893rIjYX1BETkVWdDnzTzF5e0kWXJFg5lE0k1/LfNWBejrcnOFu8Q2Rfq/hTDTU7XLUM8QOrpzg==}
- engines: {node: '>=20.0.0'}
+ resolution: {integrity: sha512-s6WVJyEZrbm6jhBpiKHsGHyePMrVQKJ85wZCFCr9W4QHv6WTjWIrdvTmO9hDEA3bNK0xkrE2DqrHsXMLWuZpQg==}
+ engines: {node: '>=22.0.0'}
resolution: {integrity: sha512-zu9QWmjpzJcomzdJQAHgDVhLGq5bLosVak1KVa40NzQHXfqr4eAHupvnPOVXEoLkg6Ocefvf/93d//SB7du4YQ==}
@@ -6763,8 +6828,8 @@ packages:
engines: {node: ^18 || >=20}
hasBin: true
- resolution: {integrity: sha512-yJBmDJr18xy47dbNVlHcgdPrulSn1nhSE6Ns9vTG+Nx9VPT6iV1MD6aQFp/t52zpf82FhLLTXAXr30NuCnxvwA==}
+ resolution: {integrity: sha512-XPUa/jz+P1oJvN9VBxw4L9MtdFfaH3DAryqPssqhb2kXjmb9npz0dly6rCsgFWOPr4Yg9mTfM3MDZgZZ+7A3lA==}
engines: {node: ^20.0.0 || >=22.0.0}
@@ -7389,6 +7454,9 @@ packages:
resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==}
+ resolution: {integrity: sha512-kjnC1DXBHcxaOaOXBHBeRtltsDG2nUiUni+jP92M9gYdW12rsmx92UsfpH7o5tDRs7I1ZZPSQJQGv3UaRfCiuw==}
+
resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}
@@ -8731,26 +8799,58 @@ snapshots:
'@babel/helper-string-parser': 7.29.7
'@babel/helper-validator-identifier': 7.29.7
dependencies:
- '@better-auth/utils': 0.3.0
- '@better-fetch/fetch': 1.1.21
+ '@better-auth/utils': 0.4.2
+ '@better-fetch/fetch': 1.3.1
+ '@opentelemetry/semantic-conventions': 1.41.1
'@standard-schema/spec': 1.1.0
- better-call: 1.1.8([email protected])
- jose: 6.1.3
- kysely: 0.28.11
- nanostores: 1.1.0
+ better-call: 1.3.6([email protected])
+ jose: 6.2.3
+ kysely: 0.29.2
+ nanostores: 1.3.0
zod: 4.4.3
+ dependencies:
+ '@better-auth/utils': 0.4.2
+ optionalDependencies:
+
+ dependencies:
+ '@better-auth/utils': 0.4.2
+ optionalDependencies:
+ kysely: 0.29.2
+
+ dependencies:
+ '@better-auth/utils': 0.4.2
+
dependencies:
- '@better-auth/utils': 0.3.0
- '@better-fetch/fetch': 1.1.21
+ '@better-auth/utils': 0.4.2
- '@better-auth/[email protected]': {}
+ dependencies:
+ '@better-auth/utils': 0.4.2
+
+ dependencies:
+ '@better-auth/utils': 0.4.2
+ '@better-fetch/fetch': 1.3.1
+
+ '@better-auth/[email protected]':
+ dependencies:
+ '@noble/hashes': 2.2.0
- '@better-fetch/[email protected]': {}
+ '@better-fetch/[email protected]': {}
'@braintree/[email protected]': {}
@@ -9581,9 +9681,9 @@ snapshots:
'@esbuild/[email protected]':
optional: true
optionalDependencies:
- '@noble/hashes': 2.0.1
+ '@noble/hashes': 2.2.0
'@floating-ui/[email protected]':
dependencies:
@@ -10132,11 +10232,11 @@ snapshots:
'@tybys/wasm-util': 0.10.2
optional: true
- '@noble/[email protected]': {}
+ '@noble/[email protected]': {}
'@noble/[email protected]': {}
- '@noble/[email protected]': {}
+ '@noble/[email protected]': {}
'@nodable/[email protected]': {}
@@ -10154,6 +10254,8 @@ snapshots:
'@open-draft/[email protected]': {}
+ '@opentelemetry/[email protected]': {}
+
'@oxc-parser/[email protected]':
optional: true
@@ -12319,36 +12421,44 @@ snapshots:
- dependencies:
- '@better-auth/utils': 0.3.0
- '@better-fetch/fetch': 1.1.21
- '@noble/ciphers': 2.1.1
- '@noble/hashes': 2.0.1
- better-call: 1.1.8([email protected])
- defu: 6.1.4
- jose: 6.1.3
- kysely: 0.28.11
- nanostores: 1.1.0
- zod: 4.3.6
+ dependencies:
+ '@better-auth/memory-adapter': 1.6.20(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])
+ '@better-auth/mongo-adapter': 1.6.20(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])
+ '@better-auth/prisma-adapter': 1.6.20(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])
+ '@better-auth/telemetry': 1.6.20(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])
+ '@better-auth/utils': 0.4.2
+ '@better-fetch/fetch': 1.3.1
+ '@noble/ciphers': 2.2.0
+ '@noble/hashes': 2.2.0
+ better-call: 1.3.6([email protected])
+ defu: 6.1.7
+ jose: 6.2.3
+ kysely: 0.29.2
+ nanostores: 1.3.0
+ zod: 4.4.3
optionalDependencies:
drizzle-kit: 0.31.10
pg: 8.18.0
react: 19.2.4
react-dom: 19.2.4([email protected])
+ transitivePeerDependencies:
+ - '@cloudflare/workers-types'
+ - '@opentelemetry/api'
dependencies:
- '@better-auth/utils': 0.3.0
- '@better-fetch/fetch': 1.1.21
+ '@better-auth/utils': 0.4.2
+ '@better-fetch/fetch': 1.3.1
rou3: 0.7.12
- set-cookie-parser: 2.7.2
+ set-cookie-parser: 3.1.0
optionalDependencies:
- zod: 4.3.6
+ zod: 4.4.3
dependencies:
@@ -12842,10 +12952,10 @@ snapshots:
d3: 7.9.0
lodash-es: 4.17.23
dependencies:
whatwg-mimetype: 5.0.0
- whatwg-url: 16.0.1(@noble/[email protected])
+ whatwg-url: 16.0.1(@noble/[email protected])
transitivePeerDependencies:
- '@noble/hashes'
@@ -12884,7 +12994,7 @@ snapshots:
dependencies:
@@ -12952,10 +13062,10 @@ snapshots:
esbuild: 0.25.12
tsx: 4.22.4
optionalDependencies:
'@electric-sql/pglite': 0.3.15
- kysely: 0.28.11
+ kysely: 0.29.2
pg: 8.18.0
postgres: 3.4.9
sqlite3: 5.1.7
@@ -13492,9 +13602,9 @@ snapshots:
dependencies:
- '@exodus/bytes': 1.15.0(@noble/[email protected])
+ '@exodus/bytes': 1.15.0(@noble/[email protected])
transitivePeerDependencies:
- '@noble/hashes'
@@ -13654,6 +13764,8 @@ snapshots:
+
@@ -13662,16 +13774,16 @@ snapshots:
dependencies:
argparse: 2.0.1
dependencies:
'@acemir/cssom': 0.9.31
'@asamuzakjp/dom-selector': 6.8.1
'@bramus/specificity': 2.4.2
- '@exodus/bytes': 1.15.0(@noble/[email protected])
+ '@exodus/bytes': 1.15.0(@noble/[email protected])
cssstyle: 6.2.0
- data-urls: 7.0.0(@noble/[email protected])
+ data-urls: 7.0.0(@noble/[email protected])
decimal.js: 10.6.0
- html-encoding-sniffer: 6.0.0(@noble/[email protected])
+ html-encoding-sniffer: 6.0.0(@noble/[email protected])
http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.6
is-potential-custom-element-name: 1.0.1
@@ -13683,7 +13795,7 @@ snapshots:
w3c-xmlserializer: 5.0.0
webidl-conversions: 8.0.1
whatwg-mimetype: 5.0.0
- whatwg-url: 16.0.1(@noble/[email protected])
+ whatwg-url: 16.0.1(@noble/[email protected])
xml-name-validator: 5.0.0
transitivePeerDependencies:
- '@noble/hashes'
@@ -13710,7 +13822,7 @@ snapshots:
dependencies:
@@ -14463,7 +14575,7 @@ snapshots:
optional: true
@@ -15306,6 +15418,8 @@ snapshots:
+
@@ -15931,7 +16045,7 @@ snapshots:
lightningcss: 1.32.0
tsx: 4.22.4
dependencies:
'@vitest/expect': 4.1.8
@@ -15955,11 +16069,11 @@ snapshots:
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 22.19.21
- jsdom: 28.1.0(@noble/[email protected])
+ jsdom: 28.1.0(@noble/[email protected])
transitivePeerDependencies:
- msw
dependencies:
'@vitest/expect': 4.1.8
@@ -15983,11 +16097,11 @@ snapshots:
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 22.19.21
- jsdom: 28.1.0(@noble/[email protected])
+ jsdom: 28.1.0(@noble/[email protected])
transitivePeerDependencies:
- msw
dependencies:
'@vitest/expect': 4.1.8
@@ -16011,7 +16125,7 @@ snapshots:
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 25.2.3
- jsdom: 28.1.0(@noble/[email protected])
+ jsdom: 28.1.0(@noble/[email protected])
transitivePeerDependencies:
- msw
@@ -16046,9 +16160,9 @@ snapshots:
dependencies:
- '@exodus/bytes': 1.15.0(@noble/[email protected])
+ '@exodus/bytes': 1.15.0(@noble/[email protected])
tr46: 6.0.0
webidl-conversions: 8.0.1
transitivePeerDependencies:
diff --git a/server/package.json b/server/package.json
index aa361455a9..1c9d1cb276 100644
--- a/server/package.json
+++ b/server/package.json
@@ -61,7 +61,7 @@
"@paperclipai/skills-catalog": "workspace:*",
"ajv": "^8.20.0",
"ajv-formats": "^3.0.1",
- "better-auth": "1.4.18",
+ "better-auth": "1.6.20",
"chokidar": "^4.0.3",
"detect-port": "^2.1.0",
"dompurify": "^3.4.8",
diff --git a/server/src/auth/better-auth.ts b/server/src/auth/better-auth.ts
index f7742b9778..ab0ce122ba 100644
--- a/server/src/auth/better-auth.ts
+++ b/server/src/auth/better-auth.ts
@@ -1,6 +1,6 @@
import type { Request, RequestHandler } from "express";
import type { IncomingHttpHeaders } from "node:http";
-import { betterAuth } from "better-auth";
+import { betterAuth, type Auth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { toNodeHandler } from "better-auth/node";
import type { Db } from "@paperclipai/db";
@@ -24,7 +24,17 @@ export type BetterAuthSessionResult = {
user: BetterAuthSessionUser | null;
};
-type BetterAuthInstance = ReturnType<typeof betterAuth>;
+type BetterAuthGetSessionApi = {
+ getSession?: (input: { headers: Headers }) => Promise<unknown>;
+};
+
+type BetterAuthHandlerTarget = Extract<Parameters<typeof toNodeHandler>[0], { handler: Auth["handler"] }>;
+
+type BetterAuthSessionResolver = {
+ api?: BetterAuthGetSessionApi;
+};
+
+type BetterAuthInstance = BetterAuthHandlerTarget & BetterAuthSessionResolver;
const AUTH_COOKIE_PREFIX_FALLBACK = "default";
const AUTH_COOKIE_PREFIX_INVALID_SEGMENTS_RE = /[^a-zA-Z0-9_-]+/g;
@@ -158,7 +168,7 @@ export function createBetterAuthInstance(db: Db, config: Config, trustedOrigins:
return betterAuth(authConfig);
}
-export function createBetterAuthHandler(auth: BetterAuthInstance): RequestHandler {
+export function createBetterAuthHandler(auth: BetterAuthHandlerTarget): RequestHandler {
const handler = toNodeHandler(auth);
return (req, res, next) => {
void Promise.resolve(handler(req, res)).catch(next);
@@ -166,10 +176,10 @@ export function createBetterAuthHandler(auth: BetterAuthInstance): RequestHandle
}
export async function resolveBetterAuthSessionFromHeaders(
- auth: BetterAuthInstance,
+ auth: BetterAuthSessionResolver,
headers: Headers,
): Promise<BetterAuthSessionResult | null> {
- const api = (auth as unknown as { api?: { getSession?: (input: unknown) => Promise<unknown> } }).api;
+ const api = auth.api;
if (!api?.getSession) return null;
const sessionValue = await api.getSession({
@@ -197,7 +207,7 @@ export async function resolveBetterAuthSessionFromHeaders(
}
export async function resolveBetterAuthSession(
- auth: BetterAuthInstance,
+ auth: BetterAuthSessionResolver,
req: Request,
): Promise<BetterAuthSessionResult | null> {
return resolveBetterAuthSessionFromHeaders(auth, headersFromExpressRequest(req));