Skip to content

Commit 7a2e5bd

Browse files
chore(deps): bump passport from 0.4.0 to 0.6.0 (#31)
* 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>
1 parent f09f3c4 commit 7a2e5bd

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"express-session": "^1.15.6",
1515
"node-fetch": "2.6.7",
1616
"openid-client": "^5.3.0",
17-
"passport": "^0.4.0"
17+
"passport": "^0.6.0"
1818
},
1919
"engines": {
2020
"node": ">=12.0"

server.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ app.get('/auth/cb', (req, res, next) => {
155155
if (err || !user) {
156156
return res.redirect('/login.html');
157157
}
158-
req.logIn(user, (err) => {
158+
const options = {
159+
keepSessionInfo: true
160+
}
161+
req.logIn(user, options, (err) => {
159162
if (err) {
160163
return next(err);
161164
}

0 commit comments

Comments
 (0)