raft-tech / TANF-app

Repo for development of a new TANF Data Reporting System
Other
16 stars 3 forks source link

Extend SESSION_COOKIE_AGE #2954

Open robgendron opened 2 months ago

robgendron commented 2 months ago

Description

2911 used the SESSION_EXPIRE_AT_BROWSER_CLOSE setting to implement browser-sessions (vs persistent-sessions). This removes the Expires= tag on the sessionid cookie. Previously, the Expires= tag was being managed by the custom SESSION_TIMEOUT variable (which only managed the cookie expiration, not the django session timeout).

Django manages session timeouts and cookie expirations using the same variable, SESSION_COOKIE_AGE. This defaults to 30 minutes, meaning any sessions longer than 30 minutes are cut off (timeout rather than keep-alive). The backend session timeout needs to be increased without setting the cookie's Expires= tag. Since SESSION_EXPIRE_AT_BROWSER_CLOSE is True, the Expires= tag still won't be set, but django's backend session timeout will.

Acceptance Criteria