Sessions settings allow you to manage the timeout duration for user sessions in your app and the logout countdown that appears before a session expires. If a user does not perform any action in the app for the specified duration, the session is automatically terminated. When the user wants to use the app again, they are redirected to the login screen and prompted to re-authenticate. This helps enhance your app’s security by preventing unattended sessions from being used by others.
The timeout duration is not hardcoded within the app. It is managed through Kuika’s Config Manager module and can be updated as needed without having to republish the app.
In this guide, you’ll learn step-by-step how to configure the Sessions settings.
How to Configure Sessions Settings?
1. Open or Create a Configuration
Log in to the Kuika platform.
From the Apps screen, open the project you’ll be working on.
Click the Config Manager module in the top menu.
To create a new configuration, click the Create a blank configuration card, give the configuration a name, and complete the creation process. If you want to use an existing configuration, click its name in the list.
2. Go to the Sessions Settings
From the tabs at the top of the configuration screen, select the Web tab.
In the PLATFORM section on the right, make sure the Support Web UI toggle is enabled.
In the left menu, click the Sessions option under the Web App heading. You can also quickly access this setting by typing “session” into the Search settings field at the top of the menu.
In the Configuration section, the Default configuration is selected by default. To create a new configuration, click the ADD NEW link at the bottom of the dropdown menu.
3. Fill Out the Session Settings Window
In the Session Settings window that opens, fill out the following fields:
Name (required): A descriptive name for the configuration.
Timeout (min): The number of minutes after which the session will expire if the user is inactive. For example, if you enter 30, the session will end if the user remains inactive for 30 minutes.
Logout countdown (sec): The duration of the countdown warning displayed to the user before the session expires. For example, if you enter 60, a warning will be displayed to the user 60 seconds before the session expires.
Persist session across page reloads: When enabled, session information is preserved when the user refreshes the page.
After entering the information, click the CREATE button to create the configuration.
4. Save the Settings
Select the configuration you created from the Configuration dropdown menu.
Make sure you have filled out all required fields completely and correctly.
Click the SAVE button in the upper-right corner to save the changes.
Once you’ve completed these steps, user sessions in your application will automatically end after the specified period of inactivity.
Session Management in Mobile Apps
The Timeout (min) setting works the same way in mobile (Android and iOS) apps. If the user does not perform any actions for the specified duration, the session is terminated, and when they try to access the app again, they are redirected to the login screen.
The countdown warning in the Logout countdown (sec) setting is displayed only in web apps. In mobile apps, the session is terminated immediately when the timeout period expires, without displaying a warning.
Example scenario:
The Timeout (min) value is set to 5.
If the user does not perform any actions in the mobile app for 5 minutes, the session is terminated.
When the user attempts to access the app again, they are redirected to the login screen and prompted to re-authenticate.
When the Timeout (min) value is changed to meet different customer or project needs, the new duration takes effect without requiring the mobile app to be republished.
Important Tips
Set the timeout duration based on your app’s security requirements. Shorter durations may be preferred for apps handling financial or sensitive data, while longer durations may be suitable for general-purpose apps.
Keep the countdown time long enough for the user to notice the warning and continue their action.
Very short timeout periods can cause users to lose data during time-consuming processes, such as filling out forms. Test the settings in a test environment using various scenarios.
By configuring the Sessions settings correctly, you can securely manage your users’ sessions.