Skip to content

Commit

Permalink
fix: #9007 revoke old sessions after adding
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Nov 30, 2020
1 parent 54dc449 commit d46740f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/user/auth.js
Expand Up @@ -107,8 +107,8 @@ module.exports = function (User) {
return;
}
await cleanExpiredSessions(uid);
await revokeSessionsAboveThreshold(uid, meta.config.maxUserSessions);
await db.sortedSetAdd('uid:' + uid + ':sessions', Date.now(), sessionId);
await revokeSessionsAboveThreshold(uid, meta.config.maxUserSessions);
};

async function revokeSessionsAboveThreshold(uid, maxUserSessions) {
Expand Down

0 comments on commit d46740f

Please sign in to comment.