From 5a39fc25485c12c0ca99757f0fd6ba206eddc95f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 19 Aug 2022 15:38:34 -0400 Subject: [PATCH] chore: remove `passport.authenticate` wrapper that passed in `keepSessionInfo` option [breaking] --- src/routes/authentication.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/routes/authentication.js b/src/routes/authentication.js index 3c6ea76f0b..b3f9bcba40 100644 --- a/src/routes/authentication.js +++ b/src/routes/authentication.js @@ -25,20 +25,6 @@ Auth.initialize = function (app, middleware) { Auth.app = app; Auth.middleware = middleware; - - // Apply wrapper around passport.authenticate to pass in keepSessionInfo option - const _authenticate = passport.authenticate; - passport.authenticate = (strategy, options, callback) => { - if (!callback && typeof options === 'function') { - return _authenticate.call(passport, strategy, options); - } - - if (!options.hasOwnProperty('keepSessionInfo')) { - options.keepSessionInfo = true; - } - - return _authenticate.call(passport, strategy, options, callback); - }; }; Auth.setAuthVars = function setAuthVars(req) {