-
Notifications
You must be signed in to change notification settings - Fork 302
UI: setOktaCookieinClients is undefined in clients.js #3265
Copy link
Copy link
Open
Description
Summary
The UI fails with ReferenceError: setOktaCookieinClients is not defined when handling any request. The function is called unconditionally in src/server/clients.js:107 in the middleware:
req.clients = {
zms: CLIENTS.zms(req, setCookieinClients(req)),
msd: CLIENTS.msd(req, setCookieinClients(req)),
zts: CLIENTS.zts(req, setCookieinClients(req)),
ums: CLIENTS.ums(req, setCookieinClients(req)),
cloud_sso: CLIENTS.cloud_sso(req, setOktaCookieinClients(req)),
};setCookieinClients is defined in the same file, but setOktaCookieinClients is not. It appears to be a Yahoo-internal function that was not included in the open-source release.
The callCloudSSO config flag in default-config.js only guards usage in api.js, not the client middleware creation.
Workaround
Define a stub before the middleware export:
function setOktaCookieinClients(req) {
return setCookieinClients(req);
}Suggested fix
Either include setOktaCookieinClients in the open-source code, or guard the cloud_sso client creation with a config check (e.g. only create it when callCloudSSO is true).
Version
v1.12.36
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels