Trigger client logout (by server)

I know that sessions can be revoked by the server. But there seems to be a difference between a client that got logged out because of a invalid session and a client that logged out itself.

  • How can the server trigger a regular logout of a client?
  • If this isn’t a feature yet, could it be added?

Hello, @some_admins

In terms of the client logout trigger of the client, are you referring to a specific client itself? For example:

  • User A is logged in to the following clients:

    • Client 1: Desktop App
    • Client 2: Web Browser
    • Client 3: iOS device
    • Client 4: Android device
  • While we have the Session Idle Timeout configuration, are you looking at the ability to configure an automatic log out for specific clients? For example (after 5 minutes):

    • Retain session in Desktop App
    • Log out from Web Browser
    • Retain session iOS device
    • Log out Android device

Else, can you please provide more details on this use case so I can confirm if this is already in the works?

The observation is that even after deleting all messages in the server’s DB and revoking all sessions, the Android App still lists some messages after logging in again. When you then logout manually and login again, the messages are gone. (The messages also vanish when you use the “Delete Cache” feature.)

Hello, @some_admins

Interesting observation. You mentioned that the Android app still show messages even after deleting them in the database and revoking all sessions:

  • May I know the method you performed to delete the messages? Did you use any of the command line tools to do this?

  • Did you revoke the sessions through the UI or from the database?

  • When you mentioned some messages are still present after logging in, does that mean that you have to log out and log in twice before it gets cleared?

  • What version of Mattermost Server, mobile OS, and Mattermost mobile app version you are running on

The behavior you mentioned sounds like a bug since the cache should be cleared when you are logged out by default. So, I want to see if I can reproduce it on my end.