-
Notifications
You must be signed in to change notification settings - Fork 16
Description
A very useful benefit of using sessions rather than JWT's for auth is the ability to invalidate all existing sessions for a user. This currently requires storing the session ID's used for each session in a table or somewhere so that they can be looked up in the future. In a similar vein to providing a static key prefix, a dynamic prefix computed using the session itself (and optionally the provided static prefix string) would allow for using keys like user_session:<USER_ID>:<SESSION_ID>
. While this may be a niche use case, it would allow for more granular session management and most importantly for my use case, invalidating all existing sessions for a given key prefix.
I'm happy to do the implementation of this, but am putting the idea out for feedback and input on whether it fits with the crate design and goals!