Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

fix: inconsistent session cookie (#1310)

Meier Lukas12105b3b2935
diff --git a/.env.example b/.env.example
index dc82ea23a..b05d685b1 100644
--- a/.env.example
+++ b/.env.example
@@ -20,8 +20,6 @@ DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'
# DB_PASSWORD='password'
# DB_NAME='name-of-database'
-# @see https://next-auth.js.org/configuration/options#nextauth_url
-AUTH_URL='http://localhost:3000'
# You can generate the secret via 'openssl rand -base64 32' on Unix
# @see https://next-auth.js.org/configuration/options#secret
diff --git a/packages/auth/configuration.ts b/packages/auth/configuration.ts
index 3b855c2f9..65d67d4b4 100644
--- a/packages/auth/configuration.ts
+++ b/packages/auth/configuration.ts
@@ -34,6 +34,17 @@ export const createConfiguration = (provider: SupportedAuthProvider | "unknown",
},
},
trustHost: true,
+ cookies: {
+ sessionToken: {
+ name: sessionTokenCookieName,
+ options: {
+ httpOnly: true,
+ sameSite: "lax",
+ path: "/",
+ secure: true,
+ },
+ },
+ },
adapter,
providers: filterProviders([
Credentials(createCredentialsConfiguration(db)),