extend token expiration time to 28 days
parent
e19dc983cd
commit
84ab4410f5
|
@ -47,7 +47,7 @@ let authCheck = (username, password, res) => {
|
||||||
AppUserModel.findOne({username: username.toLowerCase()}).populate('squad').exec((err, user) => {
|
AppUserModel.findOne({username: username.toLowerCase()}).populate('squad').exec((err, user) => {
|
||||||
if (err) deferred.reject(err.name + ': ' + err.message);
|
if (err) deferred.reject(err.name + ': ' + err.message);
|
||||||
|
|
||||||
const diff = 7 * 60 * 24; // time till expiration [minutes]
|
const diff = 28 * 60 * 24; // time till expiration [minutes]
|
||||||
|
|
||||||
if (user && !user.activated) {
|
if (user && !user.activated) {
|
||||||
res.status(codes.unauthorized).send('Account is not yet activated');
|
res.status(codes.unauthorized).send('Account is not yet activated');
|
||||||
|
|
Loading…
Reference in New Issue