Expected Behavior I use SpringSessionBackedSessionRegistry

and

.sessionManagement() .maximumSessions(1)

when i attempt to login twice simultaneously, I expect that only one login session is alive.

Current Behavior

when i attempt to login twice simultaneously, both login session is alive because SpringSessionBackedSessionRegistry not use synchronize.

Context

I want to ensure that only one session is alive even if I log in at the same time. how can i achieve this

can you add synchronize keyword ?