Closed arazinger closed 11 months ago
Hi @arazinger. I understand you need a functionality to refresh the sessionConfig with different values and delete all stale timers before doing so. It is possible to implement this, we can create a new stream and pass it as a parameter to SessionTimeoutManager, we can implement a function which updates sessionConfig and resets all timers whenever an object is received from stream.
Currently I am bit occupied, I can guide you with the changes and PR review if you want to implement
Hi, I've just made a workaround similar to your proposed solution by pushing another SessionState
event to the sessionStateStream
after new sessionConfig
is set and timer is reset. Not the prettiest solution, but works well for my case.
IMHO better (and simpler) solution would be to check if sessionConfig
changed inside _SessionTimeoutManagerState.didUpdateWidget
and no new stream would be needed for this.
Hi, I have a use case where
SessionTimeoutManager.sessionConfig
can change at any time through user settings (user can setinvalidateSessionForUserInactivity
timeout through settings screen/page).When
SessionTimeoutManager.sessionConfig
changes,SessionTimeoutManager
doesn't handle the change at all. I would expect internal timer_userInactivityTimer
would be reset in this case, so the new setting would be applied immediately - currently the new setting is applied when first user activity is detected?