Skip to content

Commit 4869989

Browse files
author
Chris Sevilleja
committed
Merge pull request scotch-io#7 from admrply/securityfix
Security Fix for `jsonwebtoken` Module
2 parents 8cfdc8a + 94060fb commit 4869989

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "node-token-authentication",
33
"main": "server.js",
44
"dependencies": {
5-
"jsonwebtoken": "~1.1.2",
6-
"express": "~4.9.8",
7-
"body-parser": "~1.9.2",
8-
"mongoose": "~3.8.19",
9-
"morgan": "~1.5.0"
5+
"body-parser": "^1.15.0",
6+
"express": "^4.13.4",
7+
"jsonwebtoken": "^5.7.0",
8+
"mongoose": "^4.4.5",
9+
"morgan": "^1.7.0"
1010
}
1111
}

server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ apiRoutes.post('/authenticate', function(req, res) {
7979
// if user is found and password is right
8080
// create a token
8181
var token = jwt.sign(user, app.get('superSecret'), {
82-
expiresInMinutes: 1440 // expires in 24 hours
82+
expiresIn: 86400 // expires in 24 hours
8383
});
8484

8585
res.json({

0 commit comments

Comments
 (0)