-
Notifications
You must be signed in to change notification settings - Fork 510
Indicate when session is about to expire with a dialog #6026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indicate when session is about to expire with a dialog #6026
Conversation
20f3745 to
053f2c3
Compare
bafaab0 to
303374a
Compare
ca147fa to
f5cb98c
Compare
271b4fc to
430a206
Compare
|
Some more issues I noticed while testing:
But that aside, I think the syncing works really well! |
551be90 to
a2cc047
Compare
|
I think the whole logic of the react component can be vastly simplified. I might push something tomorrow... |
|
Thanks for the review @ThiefMaster, sure I welcome simplifying the component, please let me know if it's something i can also do on my end. Thanks. |
7005d40 to
39ca439
Compare
39ca439 to
770d8b0
Compare
770d8b0 to
76a3478
Compare
|
Now that I'm back from the xmas break I finally found some time to finish the simplified version. Have a look at When testing it with two browser tabs it synced nicely, but avoids the huge complexity of having a separate component that's just running the interval, and also the useRefs (refs often make code harder to read/maintain). |
69782d6 to
715c5b2
Compare
|
Wow it was a total rewrite!!! The component works nicely. I just have a couple of comments about the syncing which I don't know if some were done on purpose or not.
|
|
|
715c5b2 to
114ef15
Compare
For long session lifetimes this doesn't matter, but when testing with very low lifetimes it's annoying that the refresh endpoint only does something when half the old session lifetime has been used.
By default the login page doesn't do anything while logged-in, but when dealing with a session that has a hard expiry, one may want to refresh their login (by logging in again) even before the session expired.
ca817e2 to
5e2d644
Compare
|
1,3,4 are fixed. Any suggestion for a better snooze behavior in point 2? (also see my more verbose msg on matrix) |
3fb72e1 to
6cfbb56
Compare
Each tab refreshes it on its own, and receiving a broadcast resets snooze
Co-authored-by: Adrian Moennich <[email protected]>
No description provided.