Securing an Express REST API with JSON Web Tokens (and generating them)
Recently, I have been working on a few projects that rely on users being able to authenticate against an API. I couldn't use session cookies due to the API host and client being on separate hostnames. I decided to go with using JWTs due to the fact that they were…