⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
style: drop redundant comments and the export-only env read
Andrej Acevski404fc31e9ee1
diff --git a/apps/api/src/utils/auth-secret.ts b/apps/api/src/utils/auth-secret.tsindex 9999e489d..71d41eba7 100644--- a/apps/api/src/utils/auth-secret.ts+++ b/apps/api/src/utils/auth-secret.ts@@ -1,7 +1,5 @@export const MIN_AUTH_SECRET_LENGTH = 32;-// An unset secret is not merely a weak one: Better Auth substitutes a published-// default, which makes every session cookie forgeable offline.export function resolveAuthSecret(raw = process.env.AUTH_SECRET): string {const secret = raw ?? "";if (!secret) {diff --git a/scripts/openapi/check.mjs b/scripts/openapi/check.mjsindex 444cff8d2..df82c7422 100644--- a/scripts/openapi/check.mjs+++ b/scripts/openapi/check.mjs@@ -22,12 +22,9 @@ if (!packageManager) {}const RUN = {stdio: ["ignore", "ignore", "inherit"],- // The exporter boots the app to serialize route metadata. It never issues or- // verifies a token, but the app refuses to start without a secret.env: {...process.env,- AUTH_SECRET:- process.env.AUTH_SECRET ?? "openapi-export-only-secret-not-for-serving",+ AUTH_SECRET: "openapi-export-only-secret-not-for-serving",},};diff --git a/tests/api/auth-secret.test.ts b/tests/api/auth-secret.test.tsindex ec8a6dae4..b7495f220 100644--- a/tests/api/auth-secret.test.ts+++ b/tests/api/auth-secret.test.ts@@ -7,8 +7,6 @@ describe("AUTH_SECRET resolution", () => {it.each([undefined, ""])("refuses to start when AUTH_SECRET is %p",(value) => {- // Better Auth would otherwise fall back to its published default secret,- // which makes every session cookie forgeable offline.expect(() => resolveAuthSecret(value)).toThrow(/AUTH_SECRET is not set/);},);