fix(routes): Add missing ctx shim to auth/sso-gate.js
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user