koajs / session

Simple session middleware for koa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mechanism to destroy all sessions?

AoDev opened this issue · comments

commented

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.