Cookie sessions persist as long as the cookie lives on the client. If you want to store session data that sticks between log ins to the same account, you'll need to save the data somewhere. actix_sessionlists a couple Redis options in its docs, but if you want to use another storage method you can always implement SessionStore yourself
Can't I just configure a TTL parameter somewhere in CookieSessionStore?
Or would implementing Redis also keep my user logged in? But how would an in-memory database like Redis work? How can the client-side remember what row it belongs to on the server-side?
You can add .session_lifecycle(PersistentSession::default().session_ttl(session_ttl)) before the .build() it seems. session_ttl here is a time::Duration.