From d2843bc35c0cc1ee0728fad5e1d9462ba920ff95 Mon Sep 17 00:00:00 2001 From: Lauri Gates Date: Mon, 13 Oct 2025 06:48:46 +0300 Subject: [PATCH] Fix AUTH_PROVIDERS environment variable not being read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The AUTH_PROVIDERS configuration was incorrectly reading from process.env.LOGIN_DURATION instead of process.env.AUTH_PROVIDERS, causing authentication settings to be ignored. Additionally, empty strings are now properly filtered to allow disabling authentication by setting AUTH_PROVIDERS to an empty value. Fixes authentication bypass when AUTH_PROVIDERS is set to empty string. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/env.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/env.ts b/src/env.ts index 0882784..62a8e22 100644 --- a/src/env.ts +++ b/src/env.ts @@ -40,7 +40,7 @@ export interface FoundryEnv { export const dotEnv: FoundryEnv = { API_VERSION: process.env.API_VERSION ?? `dev-${new Date().toISOString().slice(0, 10).replace(/-/g, '')}`, - AUTH_PROVIDERS: (process.env.LOGIN_DURATION ?? 'discord,oidc').split(','), + AUTH_PROVIDERS: (process.env.AUTH_PROVIDERS ?? 'discord,oidc').split(',').filter((p) => p.trim()), FOUNDRY_HOST: process.env.FOUNDRY_HOST!, FOUNDRY_USER: process.env.FOUNDRY_USER ?? 'APIUser', FOUNDRY_PASS: process.env.FOUNDRY_PASS!,