fix(routes): Add missing ctx shim to auth/sso-gate.js

This commit is contained in:
Krystie
2026-03-30 00:22:19 -07:00
parent 564c442ea4
commit e4b5a0a645

View File

@@ -11,7 +11,16 @@ module.exports = function(deps) {
const router = express.Router(); const router = express.Router();
// Extract dependencies // 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 // Caddy forward_auth gate: checks TOTP session + injects service credentials
router.get('/auth/gate/:serviceId', asyncHandler(async (req, res) => { router.get('/auth/gate/:serviceId', asyncHandler(async (req, res) => {