Invite links do not depend on resetToken expiration
This commit is contained in:
@@ -134,9 +134,6 @@ async function setupAccount(req, res, next) {
|
||||
if (error) return next(new HttpError(401, 'Invalid inviteToken'));
|
||||
if (!userObject) return next(new HttpError(401, 'Invalid inviteToken'));
|
||||
|
||||
// if you fix the duration here, the emails and UI have to be fixed as well
|
||||
if (Date.now() - userObject.resetTokenCreationTime > 7 * 24 * 60 * 60 * 1000) return next(new HttpError(401, 'Token expired'));
|
||||
|
||||
const [setupAccountError, accessToken] = await safe(users.setupAccount(userObject, req.body, AuditSource.fromRequest(req)));
|
||||
if (setupAccountError) return next(BoxError.toHttpError(setupAccountError));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user