w-a-r-m-inventory-system / Food-Pantry-Inventory

New Inventory System for Westerville Area Resource Ministry
MIT License
23 stars 20 forks source link

Session Age Too Long #295

Open deeppunster opened 3 years ago

deeppunster commented 3 years ago

Describe the bug The session cookie default age for Django is two weeks. This is much too long for this application.

To Reproduce Steps to reproduce the behavior:

  1. Login to the application.
  2. Close the tab or window without logging out.
  3. Wait up to a little less than two weeks and go to the application URL.
  4. It will return to whatever screen you were on before closing in step 2 without asking you to login again.

Expected behavior The application should require you to login again after two hours of inactivity.

Additional context Django has a parameter called SESSION_COOKIE_AGE. Its default is two weeks in seconds. It should be set to 13,200 (two hours in seconds).