Skip to content

Commit

Permalink
chore(deps): bump passport from 0.4.0 to 0.6.0 (#31)
Browse files Browse the repository at this point in the history
* chore(deps): bump passport from 0.4.0 to 0.6.0

Bumps [passport](https://github.com/jaredhanson/passport) from 0.4.0 to 0.6.0.
- [Release notes](https://github.com/jaredhanson/passport/releases)
- [Changelog](https://github.com/jaredhanson/passport/blob/master/CHANGELOG.md)
- [Commits](jaredhanson/passport@v0.4.0...v0.6.0)

---
updated-dependencies:
- dependency-name: passport
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: use `keepSessionInfo` to maintain session

The passport.js changes in `0.6.0` have breaking changes related to protecting against "Session Fixation".
- jaredhanson/passport#900
- https://medium.com/passportjs/fixing-session-fixation-b2b68619c51d

The assumption for the fix in this commit is that our example project here only has the session storage as its storage mechanism, so we're not quite vulnerable to the same thing since the storage goes away when the local project is stopped.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jaime Lopez <31429468+DevWithTheHair@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and DevWithTheHair committed Nov 22, 2022
1 parent f09f3c4 commit 7a2e5bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
13 changes: 7 additions & 6 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
Expand Up @@ -14,7 +14,7 @@
"express-session": "^1.15.6",
"node-fetch": "2.6.7",
"openid-client": "^5.3.0",
"passport": "^0.4.0"
"passport": "^0.6.0"
},
"engines": {
"node": ">=12.0"
Expand Down
5 changes: 4 additions & 1 deletion server.js
Expand Up @@ -155,7 +155,10 @@ app.get('/auth/cb', (req, res, next) => {
if (err || !user) {
return res.redirect('/login.html');
}
req.logIn(user, (err) => {
const options = {
keepSessionInfo: true
}
req.logIn(user, options, (err) => {
if (err) {
return next(err);
}
Expand Down

0 comments on commit 7a2e5bd

Please sign in to comment.