Skip to content
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

Can you invalidate specific sessions? (NOT the current one, sessions that have a specific value in a specific field) #981

Open
GEOEGII555 opened this issue Jan 9, 2025 · 1 comment
Labels
question Issue can be closed by providing information

Comments

@GEOEGII555
Copy link

Is there a way to invalidate all sessions where a specific field has a specific value? To be more specific, when a user requests to log out all devices or changes his username, I want to invalidate (or update) existing sessions that are logged into that user.
An obvious way would be to go through every single session and check it, but I tried getting the session middleware and the only methods available in crow::SessionMiddleware<crow::InMemoryStore> are before_handle and after_handle.

@GEOEGII555 GEOEGII555 changed the title Invalidate existing sessions Can you invalidate specific sessions? (NOT the current one, sessions that have a specific value in a specific field) Jan 9, 2025
@gittiver gittiver added the question Issue can be closed by providing information label Jan 10, 2025
@gittiver
Copy link
Member

gittiver commented Jan 10, 2025

Not directly, but could be done in background, shouldn't the expiration handler so something similar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue can be closed by providing information
Projects
None yet
Development

No branches or pull requests

2 participants