{"record":{"id":"91f891f11c64fc8b","repo":"RocketChat/Rocket.Chat","slug":"the-default-value-of-the-custom-setting-has-change","errorCode":null,"errorMessage":"The default value of the custom setting has changed. Please review your settings.","messagePattern":"The default value of the custom setting has changed\\. Please review your settings\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"apps/meteor/server/startup/migrations/v317.ts","lineNumber":94,"sourceCode":"\t\t\t})\n\t\t\t.filter(isTruthy);\n\n\t\tawait Promise.all(promises);\n\n\t\tconst customOAuthButtonColors = await Settings.find({\n\t\t\t_id: { $regex: /^Accounts_OAuth_Custom-[a-zA-Z0-9_-]+-button_color$/ },\n\t\t}).toArray();\n\t\tconst customOAuthButtonLabelColors = await Settings.find({\n\t\t\t_id: { $regex: /^Accounts_OAuth_Custom-[a-zA-Z0-9_-]+-button_label_color$/ },\n\t\t}).toArray();\n\n\t\tconst buttonColorPromises = customOAuthButtonColors\n\t\t\t.map(({ _id, value, packageValue }) => {\n\t\t\t\tif (packageValue !== value) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tSystemLogger.warn({\n\t\t\t\t\tmsg: 'The default value of the custom setting has changed. Please review your settings.',\n\t\t\t\t\t_id,\n\t\t\t\t\tnewValue: newDefaultButtonColor,\n\t\t\t\t});\n\n\t\t\t\treturn Settings.updateOne({ _id }, { $set: { value: newDefaultButtonColor } });\n\t\t\t})\n\t\t\t.filter(isTruthy);\n\n\t\tconst buttonLabelColorPromises = customOAuthButtonLabelColors\n\t\t\t.map(({ _id, value, packageValue }) => {\n\t\t\t\tif (packageValue !== value) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tSystemLogger.warn({\n\t\t\t\t\tmsg: 'The default value of the custom setting has changed. Please review your settings.',\n\t\t\t\t\t_id,","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/startup/migrations/v317.ts#L76-L112","documentation":"Second phase of migration 317, covering CUSTOM OAuth providers. It queries all Settings whose _id matches /^Accounts_OAuth_Custom-[a-zA-Z0-9_-]+-button_color$/ — one document per custom OAuth provider's button background color. For each, if value === packageValue (meaning the admin never customized it; the stored value is still the shipped package default #1d74f5), it warns with the setting _id and updates the value to the new default background #e4e7ea. Providers with a customized color (value !== packageValue) are skipped.","triggerScenarios":"Migration 317 runs after upgrade, and at least one custom OAuth provider (created via Admin -> OAuth -> Add custom OAuth) still has its button_color equal to the package default — i.e. the admin never changed the color. Each such provider logs one warning and gets its button background recolored to #e4e7ea.","commonSituations":"Workspaces with custom OAuth providers (internal SSO with bespoke names) upgrading across the redesign release. Because custom providers are often created and forgotten, most will match packageValue and silently turn gray, prompting admins to wonder why their login buttons changed branding.","solutions":["If the neutral gray default is fine, no action is needed.","To re-brand a specific provider, edit its button_color in Admin -> OAuth -> <custom provider> (or set Accounts_OAuth_Custom-<Name>-button_color) to your brand color, e.g. #1d74f5.","To protect colors before upgrading, change the value away from the package default — the migration's value === packageValue check then skips that provider.","After adjusting, restart or re-run service configuration update so the login buttons render the new colors."],"exampleFix":"// re-brand a custom OAuth provider post-migration\nawait Settings.updateOne(\n  { _id: 'Accounts_OAuth_Custom-mySso-button_color' },\n  { $set: { value: '#1d74f5' } },\n);","handlingStrategy":"validation","validationCode":"// Pre-upgrade: list custom OAuth providers whose button_color will be recolored\nconst atRisk = (await Settings.find({\n  _id: { $regex: /^Accounts_OAuth_Custom-[a-zA-Z0-9_-]+-button_color$/ },\n}).toArray()).filter(({ value, packageValue }) => value === packageValue);\nconsole.log(atRisk.map(({ _id }) => _id)); // these get #e4e7ea from migration 317","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When creating custom OAuth providers, always set button_color explicitly (any value different from the package default) if branding matters.","Remember the migration test is value === packageValue — an untouched setting is treated as default and recolored.","Re-verify custom provider branding on the login page after any upgrade that ships UI migrations."],"tags":["migration","oauth","custom-oauth","ui-theming","settings","upgrade"],"backgroundTag":"default-value-changed","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}