1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Merge pull request #5151 from mslourens/prevent_multiple_sessions

invalidate sessions before login
This commit is contained in:
Martin McKeaveney 2022-04-06 22:18:17 +01:00 committed by GitHub
commit bff43d37d5

View file

@ -15,6 +15,9 @@ function makeSessionID(userId, sessionId) {
}
exports.createASession = async (userId, session) => {
// invalidate all other sessions
await this.invalidateSessions(userId)
const client = await redis.getSessionClient()
const sessionId = session.sessionId
if (!session.csrfToken) {