1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00

remove default expiry in jwt token

This commit is contained in:
Vishal Banthia 2015-12-03 02:08:26 +09:00
parent 9cb231391a
commit 8a342daef9
5 changed files with 25 additions and 14 deletions

View file

@ -337,15 +337,13 @@ module.exports = function(options) {
dbapi.resetUserSettings(user.email)
})
.on('user.keys.accessToken.generate', function(data) {
var expiry = Date.now() + 100 * 365 * 24 * 3600
, jwt = jwtutil.encode({
payload: {
email: user.email
, name: user.name
}
, secret: options.secret
, expiry: expiry
})
var jwt = jwtutil.encode({
payload: {
email: user.email
, name: user.name
}
, secret: options.secret
})
var tokenId = uuid.v4()
, title = data.title