I have a user-management REST application (Spring-Boot) integrated with Keycloak, and I would like to know if there is any way to see the status (connected or disconnected) of my clients.
I have in mind is to create a table in my database with an user-identifier and a boolean, and each time have Front make login, update the boolean to true, and when logging-out update the boolean to false.
But I have a problem with sessions. If a user does not log-out (the application is left open in the background), but the token expires, how can I control this?
Is there a simpler way to control user states?