Skip to content

Commit 8eace17

Browse files
authored
Merge pull request #3969 from Dokploy/refactor/upgrade-better-auth
chore: update better-auth dependencies to version 1.5.4 and refactor …
2 parents c9a9ed8 + 3042805 commit 8eace17

File tree

5 files changed

+371
-238
lines changed

5 files changed

+371
-238
lines changed

apps/dokploy/lib/auth-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ssoClient } from "@better-auth/sso/client";
2+
import { apiKeyClient } from "@better-auth/api-key/client";
23
import {
34
adminClient,
4-
apiKeyClient,
55
inferAdditionalFields,
66
organizationClient,
77
twoFactorClient,

apps/dokploy/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"@ai-sdk/mistral": "^3.0.20",
4747
"@ai-sdk/openai": "^3.0.29",
4848
"@ai-sdk/openai-compatible": "^2.0.30",
49-
"@better-auth/sso": "1.5.0-beta.16",
49+
"@better-auth/api-key": "1.5.4",
50+
"@better-auth/sso": "1.5.4",
5051
"@codemirror/autocomplete": "^6.18.6",
5152
"@codemirror/lang-css": "^6.3.1",
5253
"@codemirror/lang-json": "^6.0.1",
@@ -99,7 +100,7 @@
99100
"ai": "^6.0.86",
100101
"ai-sdk-ollama": "^3.7.0",
101102
"bcrypt": "5.1.1",
102-
"better-auth": "1.5.0-beta.16",
103+
"better-auth": "1.5.4",
103104
"bl": "6.0.11",
104105
"boxen": "^7.1.1",
105106
"bullmq": "5.67.3",

packages/server/package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,22 @@
3737
"@ai-sdk/mistral": "^3.0.20",
3838
"@ai-sdk/openai": "^3.0.29",
3939
"@ai-sdk/openai-compatible": "^2.0.30",
40+
"@better-auth/api-key": "1.5.4",
41+
"@better-auth/sso": "1.5.4",
4042
"@better-auth/utils": "0.3.1",
4143
"@faker-js/faker": "^8.4.1",
4244
"@octokit/auth-app": "^6.1.3",
4345
"@octokit/rest": "^20.1.2",
4446
"@oslojs/crypto": "1.0.1",
4547
"@oslojs/encoding": "1.1.0",
4648
"@react-email/components": "^0.0.21",
47-
"@better-auth/sso": "1.5.0-beta.16",
4849
"@trpc/server": "11.10.0",
4950
"adm-zip": "^0.5.16",
5051
"ai": "^6.0.86",
5152
"ai-sdk-ollama": "^3.7.0",
5253
"bcrypt": "5.1.1",
53-
"better-auth": "1.5.0-beta.16",
54+
"better-auth": "1.5.4",
55+
"better-call": "2.0.2",
5456
"bl": "6.0.11",
5557
"boxen": "^7.1.1",
5658
"date-fns": "3.6.0",
@@ -59,7 +61,6 @@
5961
"drizzle-dbml-generator": "0.10.0",
6062
"drizzle-orm": "0.45.1",
6163
"drizzle-zod": "0.5.1",
62-
"yaml": "2.8.1",
6364
"lodash": "4.17.21",
6465
"micromatch": "4.0.8",
6566
"nanoid": "3.3.11",
@@ -76,19 +77,17 @@
7677
"react": "18.2.0",
7778
"react-dom": "18.2.0",
7879
"resend": "^6.0.2",
80+
"semver": "7.7.3",
7981
"shell-quote": "^1.8.1",
8082
"slugify": "^1.6.6",
8183
"ssh2": "1.15.0",
8284
"toml": "3.0.0",
8385
"ws": "8.16.0",
84-
"zod": "^4.3.6",
85-
"semver": "7.7.3",
86-
"better-call": "1.3.2"
86+
"yaml": "2.8.1",
87+
"zod": "^4.3.6"
8788
},
8889
"devDependencies": {
89-
"rimraf": "6.1.3",
90-
"@better-auth/cli": "1.5.0-beta.13",
91-
"@types/semver": "7.7.1",
90+
"@better-auth/cli": "1.4.21",
9291
"@types/adm-zip": "^0.5.7",
9392
"@types/bcrypt": "5.0.2",
9493
"@types/dockerode": "3.3.23",
@@ -100,13 +99,15 @@
10099
"@types/qrcode": "^1.5.5",
101100
"@types/react": "^18.3.5",
102101
"@types/react-dom": "^18.3.0",
102+
"@types/semver": "7.7.1",
103103
"@types/shell-quote": "^1.7.5",
104104
"@types/ssh2": "1.15.1",
105105
"@types/ws": "8.5.10",
106106
"drizzle-kit": "^0.31.4",
107107
"esbuild": "0.20.2",
108108
"esbuild-plugin-alias": "0.2.1",
109109
"postcss": "^8.5.3",
110+
"rimraf": "6.1.3",
110111
"tailwindcss": "^3.4.17",
111112
"tsc-alias": "1.8.10",
112113
"tsx": "^4.16.2",

packages/server/src/lib/auth.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import * as bcrypt from "bcrypt";
44
import { betterAuth } from "better-auth";
55
import { drizzleAdapter } from "better-auth/adapters/drizzle";
66
import { APIError } from "better-auth/api";
7-
import { admin, apiKey, organization, twoFactor } from "better-auth/plugins";
7+
import { apiKey } from "@better-auth/api-key";
8+
import { admin, organization, twoFactor } from "better-auth/plugins";
89
import { and, desc, eq } from "drizzle-orm";
910
import { BETTER_AUTH_SECRET, IS_CLOUD } from "../constants";
1011
import { db } from "../db";

0 commit comments

Comments
 (0)