Extract Actix middleware Session redis key #305
-
Goal: Prevent 1 user from having multiple active sessions. I'm using actix-web redis session middleware.
When a user does a login, I'll go ahead and insert some data into their session.
Seemingly these key/values via the First question: How can I extract this middleware session id key that redis uses for the inserts/sessions? My thought is I would go ahead and insert a the userid as a redis key with the value being the middleware redis session id so I could easily lookup and void any sessions that the user may have if logging in again. (seems hacky idk). Second question: Is there a much easier/cleaner way of doing this while still getting the nice managed sessions from the redis middleware? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Discussed in https://discord.com/channels/771444961383153695/1048711353180885083 TL;DR this is not yet possible. Feature being tracked in #306 |
Beta Was this translation helpful? Give feedback.
Discussed in https://discord.com/channels/771444961383153695/1048711353180885083
TL;DR this is not yet possible. Feature being tracked in #306