From f78819d81ac9cae9f0f2595038a9b3d045964bac Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sun, 8 Feb 2026 04:02:04 -0600 Subject: [PATCH] feat(auth): add advanced cookie settings for better security management - Introduced advanced cookie settings in the authentication configuration, including options for secure cookies and default cookie attributes. - This enhancement aims to improve security practices related to cookie handling in the application. --- packages/server/src/lib/auth.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts index bf4787a89..32ee7131e 100644 --- a/packages/server/src/lib/auth.ts +++ b/packages/server/src/lib/auth.ts @@ -30,6 +30,15 @@ const { handler, api } = betterAuth({ "/organization/delete", ], secret: BETTER_AUTH_SECRET, + advanced: { + useSecureCookies: false, + defaultCookieAttributes: { + sameSite: "lax", + secure: false, + httpOnly: true, + path: "/", + }, + }, appName: "Dokploy", socialProviders: { github: {