Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: cookie config
Sidwebworks503fec303b0b
diff --git a/packages/auth/src/services/session.server.ts b/packages/auth/src/services/session.server.tsindex 23e3ec6dd0..aea18f5589 100644--- a/packages/auth/src/services/session.server.ts+++ b/packages/auth/src/services/session.server.ts@@ -8,10 +8,10 @@ import {REFRESH_ACCESS_TOKEN_THRESHOLD,SESSION_KEY,SESSION_MAX_AGE,- SESSION_SECRET,- VERCEL_ENV+ SESSION_SECRET} from "../config/env";import type { AuthSession, Result } from "../types";+import { getCookieDomain } from "../utils/cookie";import { getCurrentPath, isGet, makeRedirectToFromHere } from "../utils/http";import { path } from "../utils/path";import { refreshAccessToken, verifyAuthSession } from "./auth.server";@@ -35,15 +35,17 @@ async function assertAuthSession(export const isTestEdition = CarbonEdition === Edition.Test;+const cookieDomain = isTestEdition ? undefined : getCookieDomain(DOMAIN);+const sessionStorage = createCookieSessionStorage({cookie: {name: "carbon",- httpOnly: VERCEL_ENV === "production",+ httpOnly: true,path: "/",sameSite: isTestEdition ? "none" : "lax",secrets: [SESSION_SECRET!],- secure: VERCEL_ENV === "production",- domain: VERCEL_ENV === "production" ? DOMAIN : undefined // eg. carbon.ms+ secure: !!cookieDomain,+ domain: cookieDomain}});