Very simple example of using express and express-jwt to issue a HMAC signed JWT within a cookie, that is then used on a protected endpoint.
npm install
npm start
- Navigate to
localhost:7171/jwt
to be issued a token in a cookie - Navigate to
localhost:7171/protected
to access the protected endpoint and the decrypted contents of the token