Skip to content

Commit

Permalink
fix(auth): passport upgrade, require express session 🐛 (#1916)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBrisorgueil authored May 30, 2022
1 parent 8bf949b commit d0c4b64
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/auth/config/users.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
const path = require('path');
const passport = require('passport');
const session = require('express-session');

const config = require(path.resolve('./config'));
const UserService = require(path.resolve('modules/users/services/user.service'));
Expand Down Expand Up @@ -36,4 +37,5 @@ module.exports = (app) => {

// Add passport's middleware
app.use(passport.initialize());
app.use(session({ secret: config.jwt.secret, resave: false, saveUninitialized: false }));
};
144 changes: 144 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"express": "^4.18.1",
"express-session": "^1.17.3",
"generate-password": "~1.7.0",
"glob": "~8.0.3",
"handlebars": "^4.7.7",
Expand Down

0 comments on commit d0c4b64

Please sign in to comment.