-
Notifications
You must be signed in to change notification settings - Fork 54
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
Consider if migrating to tower-sessions
is appropriate
#174
Comments
Hi, thank you very much for notifying this project of this initiative ! I've went ahead and started the work for this migration in PR #175, as its seemed to be quite straightforward to make these changes. One question I have, which I don't know yet how to handle, is that It is a feature that Alexandrie used to implement the alexandrie/crates/alexandrie/src/frontend/account/login.rs Lines 153 to 161 in 4813442
I wasn't able to find a similar method in So I guess, my question is: |
Hi, thanks for having a look and exploring this direction! Just to make sure I'm understanding correctly, the use case is to extend the session TTL while it's being used? If so, you're correct that's missing from the current release. That said, that is a feature I would like to incorporate, especially if folks who use axum-sessions are using it. |
Extending the session's TTL is indeed the use case. The default duration of a session in Alexandrie currently (using I'm glad to hear that this is considered, as I think it could be useful to others to, for example, automatically regenerate sessions to prevent the user from being suddenly logged out while navigating. |
This makes sense to me. I've opened an issue to track on the |
I've merged in some unreleased changes that provide This will allow applications to set the expiration time to some arbitrary Using either of these methods will persist the session back to the store and set a cookie on the client with the updated max-age attribute. Let me know if you think this would fit your use case. |
Thank you for acting so quick on this. I've tested the changes in #175 by taking a git dependency and it works perfectly. |
That's great to hear! I'm planning to cut a new release this weekend, once I resolve a couple of outstanding changes. |
Hi again, I've just released |
Hi folks,
I'm the author of
axum-sessions
, which is a crate I see you all are using--I'm glad to see you've found it useful!Over the course of the last year or so we've hit some roadblocks with our key dependency,
async-session
. The long and short of that is in order to unblock that and address some problems withaxum-sessions
's design, we've released a new crate which aims to replaceaxum-sessions
:tower-sessions
.tower-sessions
no longer relies on a third-party crate for its session implementation and this has allowed us to change its design to better fit tower and the broader tower ecosystem (i.e.axum
). For instance, we no longer need writable and readable sessions, and have simplified the interface as a result.I'd be curious if there's interest in migrating and am happy to help if so.
The text was updated successfully, but these errors were encountered: