Browse Source

Merge pull request #5151 from mslourens/prevent_multiple_sessions

invalidate sessions before login
master
Martin McKeaveney 5 years ago
committed by GitHub
parent
commit
d7dbaef8be
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/backend-core/src/security/sessions.js

3
packages/backend-core/src/security/sessions.js

@ -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) {

Loading…
Cancel
Save