|
|
|
|
|
by stavros
752 days ago
|
|
Because logging out is also supposed to invalidate the token so it can't be reused by anyone who may have stolen it. This thread is really making me despair. If you don't see a problem with JWTs, you aren't experienced enough to use JWTs. |
|
If an attacker is able to steal a victim's cookie database, their system (or at the very least, their browser) is already deeply compromised. It is very likely that an attacker with such capabilities could prevent your website from ever sending the logout request (install a browser extension which blocks it, inject into the render process to silently drop it, modify the cached JavaScript on disk to inject code into the site, etc.). The logout functionality only works insofar as you trust the client, and in any circumstances where the client's cookies could be stolen you really can't trust the client. So logout revocation is not really a meaningful security boundary.