Hacker News new | ask | show | jobs
by Raed667 3080 days ago
JWT is pretty easy to understand.

Create a token, put your userId in it, set an expiry date.

If a request comes with a token check if token is valid, check the userId & expiry date otherwise throw error.