Mintplex-Labs/anything-llm · error

Simple SSO is not enabled. It must be enabled to validate or

Error message

Simple SSO is not enabled. It must be enabled to validate or issue temporary auth tokens.

What it means

Feature guard in simpleSSOEnabled middleware: the SIMPLE_SSO_ENABLED environment variable is not present, so temporary-auth-token issuance/validation is unsupported on this instance and the middleware rejects with 403.

Source

Thrown at server/utils/middleware/simpleSSOEnabled.js:14

const { SystemSettings } = require("../../models/systemSettings");

/**
 * Checks if simple SSO is enabled for issuance of temporary auth tokens.
 * Note: This middleware must be called after `validApiKey`.
 * @param {import("express").Request} request
 * @param {import("express").Response} response
 * @param {import("express").NextFunction} next
 * @returns {void}
 */
async function simpleSSOEnabled(_, response, next) {
  if (!("SIMPLE_SSO_ENABLED" in process.env)) {
    return response
      .status(403)
      .send(
        "Simple SSO is not enabled. It must be enabled to validate or issue temporary auth tokens."
      );
  }

  // If the multi-user mode response local is not set, we need to check if it's enabled.
  if (!("multiUserMode" in response.locals)) {
    const multiUserMode = await SystemSettings.isMultiUserMode();
    response.locals.multiUserMode = multiUserMode;
  }

  if (!response.locals.multiUserMode) {
    return response
      .status(403)
      .send(
        "Multi-User mode is not enabled. It must be enabled to use Simple SSO."
      );
  }

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Set the SIMPLE_SSO_ENABLED environment variable and restart the server.
  2. Only call the Simple SSO token endpoints after Simple SSO has been configured.
Defensive patterns

Strategy: validation

When it happens

Trigger: Simple SSO validation or token issuance attempted while Simple SSO is disabled. Triggered when SSO endpoints are hit without the SSO feature enabled (simpleSSOEnabled.js:14).

Common situations: See trigger scenarios.


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/38080ece7e9386fe. Report an issue: GitHub.