Session Timeout

Category: Modules
Subcategory: All


If you have a feature request to show a session timeout warning message within the application, then this module allows to quickly implement the session timeout functionality within 5 minutes. For demo click on 'Open' button (to go to demo URL), click on demo roles icon (middle right of the screen above feedback button) and log in as administrator or user. Be idle for 5 minutes, you will see session timeout warning message. If you don't take any action and ignore the warning message for another 2 minutes then you will be logged out and session terminated message will be displayed.


Demo url


Helper module that allows developers to quickly implement the session timeout functionality. If you have a feature request to show a session timeout warning message within the application, then this is the module for you. 

Typical usage scenario

Display session timeout warning message if a user is Idle for configured number of time and on no user action automatically terminate user session by logging out user.

Features and limitations

Session timeout warning message is displayed, upon timeout user is logged out and session is terminated. This module works great with default out of the box Mendix login, if you’re logged in via single sign-on (SSO) then session within the application may be terminated and will not log you out completely because you have to logout from your SSO service.

This module will not work on native and offline profiles because Idle timer and counter widgets are only supported for web/online profiles.  



Both the widgets will be available as part of downloading this module, you don’t need to download them separately (you can update these widgets from app store if a new version is available) 

Installation / Configuration

  1. Import the module into your project
  2. Add the 'SNIP_SessionTimeout' snippet into your layout (USE_ME >> SNIP_SessionTimeout)
  3. Update project security - go to project security >> user roles >> edit each role to select 'AqSessionTimeout' module role appropriately
  4. Use the 'SNIP_SessionTimeout' to change Idle timer value. (if required)
    NOTE: By default timeout value is set to 5 minutes. If you want to update Idle timer value then go to 'SNIP_SessionTimeout' snippet >> edit Idle timer widget and update timeout value according to yur project requirements. So, for example if the timeout value is set to 5 minutes, then after 5 minutes a warning message "You have been inactive for 5 minutes. You will be automatically logged out after '{{x}}' minute(s)" will be displayed. If the user still does not take any action within '{{x}}' minute (s) then their session will be terminated. Once the session is terminated than 'Your session has been terminated due to inactivity' message will be shown.
  5. Use the 'LogOutMinutesAfterTimeoutWarning' constant to change session termination time after timeout warning pop-up is displayed. (if required)
    NOTE: By default 'LogOutMinutesAfterTimeoutWarning' constant is set to 2 minutes, if you want to increase this time, then go to constant 'LogOutMinutesAfterTimeoutWarning' which can be found under Private > Resources folder. Edit this constant and update time (in minutes) according to your project requirements. If you have already deployed this module to test/acceptance/production environments and want to update interval time than make sure you update this constant on individual environment and restart environment.
    If this constant is set to <=0 then session will be terminated immediately without showing timeout warning.

NOTE: Make sure Idle timer time is always greater than constant 'LogOutMinutesAfterTimeoutWarning' interval time


Version: 2.0.0
Framework Version: 8.12.0
Release Notes: Upgraded to Mx 8.12.0 (Mx9 supported)
Version: 1.0.0
Framework Version: 7.23.0
Release Notes: Initial release