Skip to content

UI crashes on startup: setOktaCookieinClients is not defined in clients.js #3266

@gjoranv

Description

@gjoranv

The Athenz UI fails with ReferenceError: setOktaCookieinClients is not defined when rendering any page.

In src/server/clients.js, the middleware function references setOktaCookieinClients on line 107:

cloud_sso: CLIENTS.cloud_sso(req, setOktaCookieinClients(req)),

This function is never defined in the open-source codebase. It appears to be part of an internal Okta integration that was not included in the public release.

The callCloudSSO config flag in default-config.js (default: true) only guards the usage of the cloud_sso client in api.js, not its initialization in the middleware. So even with callCloudSSO: false, the middleware still crashes.

Workaround: Add a stub function in clients.js:

function setOktaCookieinClients(req) {
    return setCookieinClients(req);
}

Expected fix: Either include the function definition, guard the cloud_sso client initialization with callCloudSSO, or default callCloudSSO to false.

Version: v1.12.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions