ptdongguan / jwtrevoke

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

script to do koa-jwt revoke since i spend almost one day to do koa keep one login only. share here. logic is simple.

1.every login do user increase signid++; 2.set isrevoked to jwt middleware (it is promise); check/load the user data; 3. compare token inside signid and current the user.signid.if not equal return true (means invalidate)

About


Languages

Language:JavaScript 100.0%