Express Auth with JWT
Simple JWT auth with Express and In-memory user storage for minimal dependencies
User flow
1- Login at /login
to get auth and refresh tokens
2- Store auth token in memory, store refresh token in httpOnly cookie
3- When auth token is about to expire, send request to /refresh
to retreive new auth token
4- When refresh token expires, login again to get a new access and refresh token