{"record":{"id":"d5317a96881d6bcc","repo":"laurent22/joplin","slug":"no-url-for-saml-authentication-set","errorCode":null,"errorMessage":"No URL for SAML authentication set.","messagePattern":"No URL for SAML authentication set\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lib/components/shared/SamlShared.ts","lineNumber":15,"sourceCode":"import { _ } from '../../locale';\nimport Setting from '../../models/Setting';\nimport shim from '../../shim';\nimport { authenticateWithCode } from '../../SyncTargetJoplinServerSAML';\nimport prefixWithHttps from '../../utils/prefixWithHttps';\nimport SsoScreenShared from './SsoScreenShared';\n\nexport default class SamlShared implements SsoScreenShared {\n\tpublic openLoginPage() {\n\t\tconst samlUrl = Setting.value('sync.11.path');\n\t\tif (!samlUrl) {\n\t\t\tconst message = _('No URL for SAML authentication set.');\n\t\t\tvoid shim.showErrorDialog(message);\n\n\t\t\tthrow new Error(message);\n\t\t}\n\n\t\tshim.openUrl(`${prefixWithHttps(samlUrl)}/login/sso-saml-app`);\n\t\treturn Promise.resolve();\n\t}\n\n\tpublic processLoginCode(code: string) {\n\t\tif (this.isLoginCodeValid(code)) {\n\t\t\treturn authenticateWithCode(this.cleanCode(code));\n\t\t} else {\n\t\t\treturn Promise.resolve(false);\n\t\t}\n\t}\n\n\tpublic isLoginCodeValid(code: string) {\n\t\tconst cleanedCode = this.cleanCode(code);\n\t\treturn !isNaN(+cleanedCode) && cleanedCode.length === 9;\n\t}","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/laurent22/joplin/blob/2654b33620775080d1d59c552259d41e33dad3d2/packages/lib/components/shared/SamlShared.ts#L1-L33","documentation":"Thrown by SamlShared.openLoginPage() when the SAML server URL setting (sync.11.path, i.e. the Joplin Server (SAML) sync target path) is empty. Without a server URL the SSO login page URL cannot be constructed, so the user is shown an error dialog and the function throws to halt the login flow.","triggerScenarios":"The user picks the 'Joplin Server (SAML)' sync target but has not entered a server URL in sync.11.path, then clicks the SSO/SAML login button. openLoginPage reads Setting.value('sync.11.path'), finds it falsy, and throws.","commonSituations":"First-time SAML setup where the server URL field was skipped; the setting was cleared/reset; misconfigured deployment where the SAML target was selected without a path.","solutions":["Set the Joplin Server (SAML) URL in the sync settings (sync.11.path) before attempting SSO login.","Verify the URL is correct and reachable in a browser.","If the setting won't persist, check for a config/profile write permission issue."],"exampleFix":"// before — no URL configured, openLoginPage throws\n\n// after — ensure the setting is present before opening login\nimport Setting from '../../models/Setting';\nif (!Setting.value('sync.11.path')) {\n  // prompt the user to enter the SAML server URL first\n  return;\n}","handlingStrategy":"validation","validationCode":"import Setting from './models/Setting';\nconst samlUrl = Setting.value('sync.11.path');\nif (!samlUrl) {\n  // prompt the user to configure the SAML server URL before login\n  return;\n}\nsamlShared.openLoginPage();","typeGuard":null,"tryCatchPattern":"try {\n  samlShared.openLoginPage();\n} catch (error) {\n  if (/No URL for SAML/.test(error.message)) {\n    // guide the user to set sync.11.path\n    showConfigPrompt();\n    return;\n  }\n  throw error;\n}","preventionTips":["Require sync.11.path to be set before enabling the SAML login button in the UI.","Validate the URL is reachable before attempting SSO.","Centralise the presence check so all entry points guard consistently."],"tags":["saml","sso","authentication","configuration","joplin-server"],"backgroundTag":null,"analyzedSha":"2654b33620775080d1d59c552259d41e33dad3d2","analyzedAt":"2026-08-12T14:26:46.263Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}