Replies: 1 comment 2 replies
-
I'm OK with the general idea of making it easier to automatically extend the remember deadline for logged in sessions. I don't want it to happen on every request because then it is an extra query on every request. Maybe it would be better to only extend the remember deadline if it hasn't been extended in the last hour (by default, time frame configurable)? We could do that by storing a session value for the last time the remember deadline was updated in the current session. Not sure if we want to build that functionality into the remember feature, or add it as a separate feature. What are your thoughts? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the preparation for my screencast for rebuilding GitHub authentication, I want to replicate how GitHub does remembering. As far as I could tell, GitHub automatically remembers the user on login, and forgets the user probably 2 weeks after they have last been active.
From my understanding, the current remember feature remembers the user
remember_period
after it has been remembered, and optionallyremember_deadline_period
after it has last been remembered ifextend_remember_deadline?
istrue
. So, if the user has their browser open for 2 weeks, keeping the session cookie alive, once they close the browser they will not be remembered, correct?If yes, do you have ideas how to implement the behavior that GitHub has? I tried extracting extending remember deadline into a separate method, so that it can be called in the routing tree, I'm not sure if that would be a good approach.
Beta Was this translation helpful? Give feedback.
All reactions