How to Sign and Validate JSON Web Tokens (JWT)

When I started learning about JSON Web Tokens, there were some things that were straightforward to understand — and some concepts that felt like “hidden secrets” of JWT lore. 🧙‍♂️

This article aims to demystify signing and validating JSON Web Tokens, with little need for security or cryptography knowledge.