Merge pull request #3969 from Dokploy/refactor/upgrade-better-auth

chore: update better-auth dependencies to version 1.5.4 and refactor …
This commit is contained in:
Mauricio Siu
2026-03-10 16:30:23 -06:00
committed by GitHub
5 changed files with 393 additions and 260 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { ssoClient } from "@better-auth/sso/client"; import { ssoClient } from "@better-auth/sso/client";
import { apiKeyClient } from "@better-auth/api-key/client";
import { import {
adminClient, adminClient,
apiKeyClient,
inferAdditionalFields, inferAdditionalFields,
organizationClient, organizationClient,
twoFactorClient, twoFactorClient,
+3 -2
View File
@@ -46,7 +46,8 @@
"@ai-sdk/mistral": "^3.0.20", "@ai-sdk/mistral": "^3.0.20",
"@ai-sdk/openai": "^3.0.29", "@ai-sdk/openai": "^3.0.29",
"@ai-sdk/openai-compatible": "^2.0.30", "@ai-sdk/openai-compatible": "^2.0.30",
"@better-auth/sso": "1.5.0-beta.16", "@better-auth/api-key": "1.5.4",
"@better-auth/sso": "1.5.4",
"@codemirror/autocomplete": "^6.18.6", "@codemirror/autocomplete": "^6.18.6",
"@codemirror/lang-css": "^6.3.1", "@codemirror/lang-css": "^6.3.1",
"@codemirror/lang-json": "^6.0.1", "@codemirror/lang-json": "^6.0.1",
@@ -99,7 +100,7 @@
"ai": "^6.0.86", "ai": "^6.0.86",
"ai-sdk-ollama": "^3.7.0", "ai-sdk-ollama": "^3.7.0",
"bcrypt": "5.1.1", "bcrypt": "5.1.1",
"better-auth": "1.5.0-beta.16", "better-auth": "1.5.4",
"bl": "6.0.11", "bl": "6.0.11",
"boxen": "^7.1.1", "boxen": "^7.1.1",
"bullmq": "5.67.3", "bullmq": "5.67.3",
+10 -9
View File
@@ -37,6 +37,8 @@
"@ai-sdk/mistral": "^3.0.20", "@ai-sdk/mistral": "^3.0.20",
"@ai-sdk/openai": "^3.0.29", "@ai-sdk/openai": "^3.0.29",
"@ai-sdk/openai-compatible": "^2.0.30", "@ai-sdk/openai-compatible": "^2.0.30",
"@better-auth/api-key": "1.5.4",
"@better-auth/sso": "1.5.4",
"@better-auth/utils": "0.3.1", "@better-auth/utils": "0.3.1",
"@faker-js/faker": "^8.4.1", "@faker-js/faker": "^8.4.1",
"@octokit/auth-app": "^6.1.3", "@octokit/auth-app": "^6.1.3",
@@ -44,13 +46,13 @@
"@oslojs/crypto": "1.0.1", "@oslojs/crypto": "1.0.1",
"@oslojs/encoding": "1.1.0", "@oslojs/encoding": "1.1.0",
"@react-email/components": "^0.0.21", "@react-email/components": "^0.0.21",
"@better-auth/sso": "1.5.0-beta.16",
"@trpc/server": "11.10.0", "@trpc/server": "11.10.0",
"adm-zip": "^0.5.16", "adm-zip": "^0.5.16",
"ai": "^6.0.86", "ai": "^6.0.86",
"ai-sdk-ollama": "^3.7.0", "ai-sdk-ollama": "^3.7.0",
"bcrypt": "5.1.1", "bcrypt": "5.1.1",
"better-auth": "1.5.0-beta.16", "better-auth": "1.5.4",
"better-call": "2.0.2",
"bl": "6.0.11", "bl": "6.0.11",
"boxen": "^7.1.1", "boxen": "^7.1.1",
"date-fns": "3.6.0", "date-fns": "3.6.0",
@@ -59,7 +61,6 @@
"drizzle-dbml-generator": "0.10.0", "drizzle-dbml-generator": "0.10.0",
"drizzle-orm": "0.45.1", "drizzle-orm": "0.45.1",
"drizzle-zod": "0.5.1", "drizzle-zod": "0.5.1",
"yaml": "2.8.1",
"lodash": "4.17.21", "lodash": "4.17.21",
"micromatch": "4.0.8", "micromatch": "4.0.8",
"nanoid": "3.3.11", "nanoid": "3.3.11",
@@ -76,19 +77,17 @@
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"resend": "^6.0.2", "resend": "^6.0.2",
"semver": "7.7.3",
"shell-quote": "^1.8.1", "shell-quote": "^1.8.1",
"slugify": "^1.6.6", "slugify": "^1.6.6",
"ssh2": "1.15.0", "ssh2": "1.15.0",
"toml": "3.0.0", "toml": "3.0.0",
"ws": "8.16.0", "ws": "8.16.0",
"zod": "^4.3.6", "yaml": "2.8.1",
"semver": "7.7.3", "zod": "^4.3.6"
"better-call": "1.3.2"
}, },
"devDependencies": { "devDependencies": {
"rimraf": "6.1.3", "@better-auth/cli": "1.4.21",
"@better-auth/cli": "1.5.0-beta.13",
"@types/semver": "7.7.1",
"@types/adm-zip": "^0.5.7", "@types/adm-zip": "^0.5.7",
"@types/bcrypt": "5.0.2", "@types/bcrypt": "5.0.2",
"@types/dockerode": "3.3.23", "@types/dockerode": "3.3.23",
@@ -100,6 +99,7 @@
"@types/qrcode": "^1.5.5", "@types/qrcode": "^1.5.5",
"@types/react": "^18.3.5", "@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@types/semver": "7.7.1",
"@types/shell-quote": "^1.7.5", "@types/shell-quote": "^1.7.5",
"@types/ssh2": "1.15.1", "@types/ssh2": "1.15.1",
"@types/ws": "8.5.10", "@types/ws": "8.5.10",
@@ -107,6 +107,7 @@
"esbuild": "0.20.2", "esbuild": "0.20.2",
"esbuild-plugin-alias": "0.2.1", "esbuild-plugin-alias": "0.2.1",
"postcss": "^8.5.3", "postcss": "^8.5.3",
"rimraf": "6.1.3",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
"tsc-alias": "1.8.10", "tsc-alias": "1.8.10",
"tsx": "^4.16.2", "tsx": "^4.16.2",
+2 -1
View File
@@ -4,7 +4,8 @@ import * as bcrypt from "bcrypt";
import { betterAuth } from "better-auth"; import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle"; import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { APIError } from "better-auth/api"; import { APIError } from "better-auth/api";
import { admin, apiKey, organization, twoFactor } from "better-auth/plugins"; import { apiKey } from "@better-auth/api-key";
import { admin, organization, twoFactor } from "better-auth/plugins";
import { and, desc, eq } from "drizzle-orm"; import { and, desc, eq } from "drizzle-orm";
import { BETTER_AUTH_SECRET, IS_CLOUD } from "../constants"; import { BETTER_AUTH_SECRET, IS_CLOUD } from "../constants";
import { db } from "../db"; import { db } from "../db";
+377 -247
View File
File diff suppressed because it is too large Load Diff