For an application built on Vaadin + Spring Security, the logout logic is written. I created a SecurityService that handles login / logout operations and also does "remember me". So, if I log in on one browser tab, then open (in the same browser) the second tab, after that I log in to any of them, on the remaining tab (on which I did not log in), I get a Communication Error (when to use the buttons or polling occurs ), or throws me to the home page (most likely from a heartbeat request). I am expecting a session expired error:
public void logout() { SecurityContextHolder.clearContext(); Optional.ofNullable( VaadinSession.getCurrent() ) .ifPresent( session -> session.close() ); }
also
session.getSession().invalidate()
didn't help.