session icon indicating copy to clipboard operation
session copied to clipboard

Mechanism to destroy all sessions?

Open AoDev opened this issue 3 years ago • 0 comments

I have a use case where the application can be set into a "maintenance mode".

When doing that, I'd like to destroy all current active sessions.

So far I only know that setting a session to null in a middleware, will destroy it. But it's mainly for the "sign out" use case. Could koa-session provide an apocalypse method to destroy all?

Note I am using Redis, so I guess I could delete all session keys but I have more stuff than the sessions in there. I'd rather have a standard method independent of the store.

AoDev avatar Sep 27 '20 17:09 AoDev