diff --git a/lib/util/settings.js b/lib/util/settings.js index 276b8b8e1..0e0491ce5 100644 --- a/lib/util/settings.js +++ b/lib/util/settings.js @@ -314,7 +314,12 @@ function write() { const actual = yaml.read(file); // In case the setting is defined in a separte file (e.g. !secret network_key) update it there. - for (const path of [['mqtt', 'user'], ['mqtt', 'password'], ['advanced', 'network_key']]) { + for (const path of [ + ['mqtt', 'user'], + ['mqtt', 'password'], + ['advanced', 'network_key'], + ['frontend', 'auth_token'], + ]) { if (actual[path[0]] && actual[path[0]][path[1]]) { const match = /!(.*) (.*)/g.exec(actual[path[0]][path[1]]); if (match) { @@ -439,6 +444,10 @@ function read() { s.advanced.network_key = interpetValue(s.advanced.network_key); } + if (s.frontend && s.frontend.auth_token) { + s.frontend.auth_token = interpetValue(s.frontend.auth_token); + } + // Read devices/groups configuration from separate file if specified. const readDevicesOrGroups = (type) => { if (typeof s[type] === 'string' || Array.isArray(s[type])) {