Add an AUTO_LOGOUT_TIME option for session expiry
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
The android and desktop-app installers each override Django session settings to keep embedded single-user sessions alive (SESSION_EXPIRE_AT_BROWSER_CLOSE = False, SESSION_COOKIE_AGE = 52560000). Make session expiry a first-class Kolibri deployment option, set by each installer, instead of duplicated raw Django overrides.
Complexity: Medium Target branch: develop
Context
platforms/android/app/src/main/python/kolibri_app_settings.pyandplatforms/desktop-app/src/kolibri_app/django_app_settings.pyboth set the same two constants; there is no Kolibri option controlling session cookie age today.
The Change
Add an AUTO_LOGOUT_TIME option to kolibri.utils.conf.OPTIONS controlling SESSION_COOKIE_AGE, where 0 means effectively-unlimited. Default SESSION_EXPIRE_AT_BROWSER_CLOSE to False in core settings. The android and desktop-app installers then set AUTO_LOGOUT_TIME = 0 via their deployment configuration and drop their raw overrides.
Acceptance Criteria
- [ ] An
AUTO_LOGOUT_TIMEoption inkolibri.utils.conf.OPTIONSsetsSESSION_COOKIE_AGE. - [ ]
AUTO_LOGOUT_TIME = 0maps to the existing long-lived valueSESSION_COOKIE_AGE = 52560000(~608 days). - [ ]
SESSION_EXPIRE_AT_BROWSER_CLOSEdefaults toFalsein core settings. - [ ] The option's default preserves current session behaviour for standard (non-installer) deployments.
- [ ] The android and desktop-app installers set
AUTO_LOGOUT_TIME = 0via their deployment configuration and drop their raw session overrides. - [ ] The dead
from __future__lines in the android copy are removed. - [ ] The new option is documented alongside the other
OPTIONS.
AI usage
Claude Code found the duplicated session overrides. I set the design direction and edited the issue.
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.