Tokens are now valid for a week

This commit is contained in:
Johannes Zellner
2016-08-01 10:14:45 +02:00
parent ce28449734
commit f60ff45cb6
7 changed files with 14 additions and 8 deletions

View File

@@ -463,7 +463,7 @@ function setPassword(userId, newPassword, callback) {
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));
var token = tokendb.generateToken();
var expiresAt = Date.now() + 24 * 60 * 60 * 1000; // 1 day
var expiresAt = Date.now() + constants.DEFAULT_TOKEN_EXPIRATION;
tokendb.add(token, user.id, result.id, expiresAt, '*', function (error) {
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));