Invite token should be valid for 7 days
This commit is contained in:
@@ -123,7 +123,7 @@ function setupAccount(req, res, next) {
|
||||
if (error) return next(new HttpError(401, 'Invalid Reset Token'));
|
||||
|
||||
// if you fix the duration here, the emails and UI have to be fixed as well
|
||||
if (Date.now() - userObject.resetTokenCreationTime > 24 * 60 * 60 * 1000) return next(new HttpError(401, 'Token expired'));
|
||||
if (Date.now() - userObject.resetTokenCreationTime > 7 * 24 * 60 * 60 * 1000) return next(new HttpError(401, 'Token expired'));
|
||||
|
||||
users.setupAccount(userObject, req.body, auditSource.fromRequest(req), function (error, accessToken) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
Reference in New Issue
Block a user