Skip to content

Commit

Permalink
Merge pull request nightscout#8085 from nightscout/wip/bewest/api-sec…
Browse files Browse the repository at this point in the history
…ret-free-reads

Wip/bewest/api secret free reads
  • Loading branch information
bewest authored Sep 3, 2023
2 parents d602de1 + 9f2f98b commit 5488df4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions lib/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function init () {
, adminNotifiesEnabled: true
, obscured: ''
, obscureDeviceProvenance: ''
, authenticationPromptOnLoad: false
};

var secureSettings = [
Expand Down Expand Up @@ -111,6 +112,7 @@ function init () {
, bgTargetBottom: mapNumber
, authFailDelay: mapNumber
, adminNotifiesEnabled: mapTruthy
, authenticationPromptOnLoad: mapTruthy
};

function filterObj(obj, secureKeys) {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5488df4

Please sign in to comment.