{"record":{"id":"3bece4ea00797746","repo":"Mintplex-Labs/anything-llm","slug":"login-via-credentials-has-been-disabled-by-the-adm","errorCode":null,"errorMessage":"Login via credentials has been disabled by the administrator.","messagePattern":"Login via credentials has been disabled by the administrator\\.","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/utils/middleware/simpleSSOEnabled.js","lineNumber":71,"sourceCode":" * SIMPLE_SSO_NO_LOGIN environment variable is set as well as\n * SIMPLE_SSO_ENABLED is set.\n *\n * This middleware will 403 if SSO is enabled and no login is allowed and\n * the system is in multi-user mode. Otherwise, it will call next.\n *\n * @param {import(\"express\").Request} request\n * @param {import(\"express\").Response} response\n * @param {import(\"express\").NextFunction} next\n * @returns {void}\n */\nasync function simpleSSOLoginDisabledMiddleware(_, response, next) {\n  if (!(\"multiUserMode\" in response.locals)) {\n    const multiUserMode = await SystemSettings.isMultiUserMode();\n    response.locals.multiUserMode = multiUserMode;\n  }\n\n  if (response.locals.multiUserMode && simpleSSOLoginDisabled()) {\n    response.status(403).json({\n      success: false,\n      error: \"Login via credentials has been disabled by the administrator.\",\n    });\n    return;\n  }\n  next();\n}\n\nmodule.exports = {\n  simpleSSOEnabled,\n  simpleSSOLoginDisabled,\n  simpleSSOLoginDisabledMiddleware,\n};\n","sourceCodeStart":53,"sourceCodeEnd":85,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/middleware/simpleSSOEnabled.js#L53-L85","documentation":"Policy guard in simpleSSOLoginDisabledMiddleware: SIMPLE_SSO_ENABLED and SIMPLE_SSO_NO_LOGIN are both set in multi-user mode, so password login has been administratively disabled and credential-based login attempts are refused with 403.","triggerScenarios":"Credential-based login attempted while disabled by the administrator. Triggered when the simple SSO middleware blocks username/password login (simpleSSOEnabled.js:71).","commonSituations":"See trigger scenarios.","solutions":["Log in via the configured SSO provider instead of username/password.","To re-enable credential login, remove the SIMPLE_SSO_NO_LOGIN environment variable and restart."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}