Node.js · Middle · Question 39 of 75
What is a common downside of JWTs compared with server-side sessions?
- 1They can't hold the user ID
- ✓Correct answer: They are hard to revoke before they expire, because the server doesn't store them
- 3They only work over HTTP/2
Explanation
Common solutions are short-lived access tokens with refresh tokens, or a deny list. Sessions in a store like Redis can be deleted instantly.