Skip to content

Commit

Permalink
Merge #246
Browse files Browse the repository at this point in the history
246: Revert "Update passport to 0.6.0" r=aragilar a=aragilar

This reverts commit 13ced8b. This is needed as 0.6.0 is broken, and needs a fix to how session handling works. This is covered in
jaredhanson/passport#904

Co-authored-by: James Tocknell <aragilar@gmail.com>
  • Loading branch information
bors[bot] and aragilar committed Oct 4, 2022
2 parents 3d0bd5f + 13d94dd commit d542d1f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 25 deletions.
54 changes: 36 additions & 18 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -24,7 +24,7 @@
"@types/jsonwebtoken": "8.5.9",
"@types/node": "18.7.23",
"@types/nodemailer": "6.4.5",
"@types/passport": "1.0.11",
"@types/passport": "1.0.7",
"@types/passport-google-oauth20": "2.0.11",
"@types/passport-oauth2": "1.4.11",
"@types/pouchdb": "6.4.0",
Expand All @@ -45,7 +45,7 @@
"jsonwebtoken": "8.5.1",
"nodemailer": "6.7.8",
"oauth": "0.10.0",
"passport": "0.6.0",
"passport": "0.5.3",
"passport-google-oauth20": "2.0.0",
"passport-oauth2": "1.6.1",
"pouchdb": "7.3.0",
Expand All @@ -57,6 +57,7 @@
"uuid": "9.0.0"
},
"devDependencies": {
"@types/expect": "^24.3.0",
"@types/mocha": "^10.0.0",
"dotenv": "^16.0.2",
"env-cmd": "^10.1.0",
Expand Down
7 changes: 2 additions & 5 deletions src/routes.ts
Expand Up @@ -227,12 +227,9 @@ app.get('/', async (req, res) => {

app.get('/logout/', (req, res) => {
if (req.user) {
req.logout(() => {
res.redirect('/');
});
} else {
res.redirect('/');
req.logout();
}
res.redirect('/');
});

app.get('/send-token/', (req, res) => {
Expand Down

0 comments on commit d542d1f

Please sign in to comment.