From d439165dd2d2af6a3c107c7bd1e8f5f0501f2780 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Wed, 11 Nov 2020 19:55:15 -0800 Subject: [PATCH] fix(auth): Fixing typo that was breaking basic authentication --- src/middleware/auth.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/middleware/auth.js b/src/middleware/auth.js index b6bd2a6..b349d4d 100644 --- a/src/middleware/auth.js +++ b/src/middleware/auth.js @@ -33,7 +33,9 @@ util.inspect.defaultOptions = { depth: 1 } // let _this // Set default rate limit value for testing -const PRO_PASSES = process.env.PRO_PASSES ? process.env.PRO_PASSES : 'testpassword' +const PRO_PASSES = process.env.PRO_PASS + ? process.env.PRO_PASS + : 'testpassword' // Convert the pro-tier password string into an array split by ':'. const PRO_PASS = PRO_PASSES.split(':') @@ -47,6 +49,8 @@ class AuthMW { // Initialize passport for 'anonymous' authentication. passport.use(new AnonymousStrategy()) + console.log(`PRO_PASS: ${JSON.stringify(PRO_PASS, null, 2)}`) + // Initialize passport for 'basic' authentication. passport.use( new BasicStrategy({ passReqToCallback: true }, function (