diff --git a/lib/client/index.js b/lib/client/index.js index bee6134e947..0f0d17b7d64 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -1146,7 +1146,7 @@ client.load = function load (serverSettings, callback) { } console.log('Subscribed for alarms', data); - if (!data.success) { + if (client.settings.authenticationPromptOnLoad && !data.success) { client.hashauth.requestAuthentication(function afterRequest () { client.hashauth.updateSocketAuth(); if (callback) { diff --git a/lib/settings.js b/lib/settings.js index d538f226591..8de44d64a73 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -72,6 +72,7 @@ function init () { , adminNotifiesEnabled: true , obscured: '' , obscureDeviceProvenance: '' + , authenticationPromptOnLoad: false }; var secureSettings = [ @@ -111,6 +112,7 @@ function init () { , bgTargetBottom: mapNumber , authFailDelay: mapNumber , adminNotifiesEnabled: mapTruthy + , authenticationPromptOnLoad: mapTruthy }; function filterObj(obj, secureKeys) { diff --git a/package-lock.json b/package-lock.json index 8879fc3d5ce..10c5ff1aeb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6367,9 +6367,9 @@ "dev": true }, "nightscout-connect": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/nightscout-connect/-/nightscout-connect-0.0.10.tgz", - "integrity": "sha512-4jZG9OcrbBwofEvmz154j0K5U/WxWlZ3gVvPNZelSP5fwXVPfZvnivgjg6k8dPoxDErTqvBcmOC9IeMv5ydosw==", + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/nightscout-connect/-/nightscout-connect-0.0.11.tgz", + "integrity": "sha512-O7wMMG6BgW7Wxm0hr4Fj9SO1IH/7f29obKSnN8V9I2Ko4v5XxL5FqoONpmvlgI6So0MwksoMCcedSCiCL6Lj4A==", "requires": { "axios": "^1.3.4", "axios-cookiejar-support": "^4.0.6", diff --git a/package.json b/package.json index 99781555669..1464611841d 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "mongo-url-parser": "^1.0.2", "mongodb": "^3.6.0", "mongomock": "^0.1.2", - "nightscout-connect": "0.0.10", + "nightscout-connect": "^0.0.11", "node-cache": "^4.2.1", "parse-duration": "^0.1.3", "process": "^0.11.10",