From e4b5a0a64569d224edce3709458d398aec234cbd Mon Sep 17 00:00:00 2001 From: Krystie Date: Mon, 30 Mar 2026 00:22:19 -0700 Subject: [PATCH] fix(routes): Add missing ctx shim to auth/sso-gate.js --- dashcaddy-api/routes/auth/sso-gate.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dashcaddy-api/routes/auth/sso-gate.js b/dashcaddy-api/routes/auth/sso-gate.js index a0e4ba0..f8fff5c 100644 --- a/dashcaddy-api/routes/auth/sso-gate.js +++ b/dashcaddy-api/routes/auth/sso-gate.js @@ -11,7 +11,16 @@ module.exports = function(deps) { const router = express.Router(); // Extract dependencies - const { authManager, totpConfig, session, asyncHandler, errorResponse, log, getAppSession, appSessionCache } = deps; + const { authManager, totpConfig, session, asyncHandler, errorResponse, log, getAppSession, appSessionCache, credentialManager, fetchT, getServiceById, licenseManager, servicesStateManager } = deps; + + // Create ctx-like object for compatibility + const ctx = { + credentialManager, + fetchT, + getServiceById, + licenseManager, + servicesStateManager + }; // Caddy forward_auth gate: checks TOTP session + injects service credentials router.get('/auth/gate/:serviceId', asyncHandler(async (req, res) => {