DEV Community

Discussion on: Secure Your Node.js Application With JSON Web Token

Collapse
 
themarcba profile image
Marc Backes

First, thanks for your kind words. I appreciate the encouragement a lot 🤗

I always add generated tokens to the user object, so they could themselves remove other logged-in sessions (upon login I check for users with the given id AND token in user object). To block someone, you can delete all their existing tokens and set a flag in the user object to deny any further token generation.

I could write up another blog post on this when I get some time