mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-29 06:48:45 +00:00
refactor(auth): conditionally apply advanced cookie settings based on cloud environment
- Updated the authentication configuration to conditionally include advanced cookie settings only when not in a cloud environment. - This change enhances flexibility in cookie management while maintaining existing security practices.
This commit is contained in:
@@ -30,15 +30,19 @@ const { handler, api } = betterAuth({
|
|||||||
"/organization/delete",
|
"/organization/delete",
|
||||||
],
|
],
|
||||||
secret: BETTER_AUTH_SECRET,
|
secret: BETTER_AUTH_SECRET,
|
||||||
advanced: {
|
...(!IS_CLOUD
|
||||||
useSecureCookies: false,
|
? {
|
||||||
defaultCookieAttributes: {
|
advanced: {
|
||||||
sameSite: "lax",
|
useSecureCookies: false,
|
||||||
secure: false,
|
defaultCookieAttributes: {
|
||||||
httpOnly: true,
|
sameSite: "lax",
|
||||||
path: "/",
|
secure: false,
|
||||||
},
|
httpOnly: true,
|
||||||
},
|
path: "/",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
appName: "Dokploy",
|
appName: "Dokploy",
|
||||||
socialProviders: {
|
socialProviders: {
|
||||||
github: {
|
github: {
|
||||||
|
|||||||
Reference in New Issue
Block a user