erlef / erlef/website

Keeping sessions alive longer

Open
#354 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
84
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Currently and per wildapricot as the oauth provider, the max ttl time on a session is extremely short (15 minutes). This issue has been created to go over ideas of how we might be able to extend sessions securely.

Currently, if you make requests within that ttl you, we refresh with wildapricot, and extend the session. However, if you say don't do anything for 16 minutes, then perform a request, you will be logged out. Since we don't deal in PII data directly or anything sensitive, it doesn't make sense for our app IMO.

The first idea that comes to mind is creating a GenServer that holds sessions on the backend and periodically will refresh them. Let's say the user has exceeded 15 minutes, let's say they make their next request 1 minute after said 15 minute window , but we have refreshed on the backend. We could lookup the session on the backend and merge the expiration, etc. in the session data and update the cookie.

Obviously, there would need to be an upper bounds on how many times we will do a refresh on the backend. The question at hand are there any security considerations that aren't being thought about with such a solution?

Pinging @voltone for his expertise in this area.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.