Frequent logouts are a frustrating experience for users, especially on servers with short session lengths configured. In v5.24 and later, you can enable the configuration setting for extending session length with activity to automatically extend sessions and keep users logged in as long as they are active in their Mattermost apps.
Why should I enable extending sessions?
Devices that are logged out do not receive notifications and require the user to reauthenticate with their account credentials to continue using Mattermost. We hear feedback that this is especially frustrating for users on servers with short session lengths configured, since they frequently have to reauthenticate even if they are using their apps regularly, and can miss notifications as a result.
How does extending sessions work?
A session is started when a user logs into Mattermost, and the session length defines how long a session is valid before the user is logged out of their device. When Extending session length with activity is enabled, user activity (such as switching channels or typing) restarts the session. Users are only logged out if they have no activity in Mattermost on a particular device for the entire duration of the session length.
How do I enable extending sessions?
New servers installing v5.24 or later will have
ExtendSessionLengthWithActivity enabled by default. Servers upgrading to v5.24 or later will need to enable this setting if desired:
- In System Console > Session Lengths, enable the configuration setting Extend session length with activity. Alternatively, set
"true"in your configuration file.
- (Optional) Customize the session lengths (time of user inactivity that triggers a logout). Longer session lengths are recommended for improved user experience if compliant with your organization’s policies.