How to invalidate Cognito-issued JWT tokens
The ability to invalidate a user’s session with immediate effect is a common enterprise requirement.
However, this goes against how token-based authentication is designed to work. JWT tokens are stateless and are typically short-lived (for security reasons) but can be refreshed with refresh tokens.
So, is it possible to invalidate Cognito-issued JWT tokens?
The short answer is no.
The long answer is yes, you can achieve this effect with some work and some performance overhead.
How? Well, come in and find out!