I am not really sure about JWT mechanism and why its better (if its) than just store and match user's token from his DB document to grant and access?
Asked
Active
Viewed 117 times
1
-
2Possible duplicate of [JSON Web Token (JWT) benefits over a database session token](https://stackoverflow.com/questions/26216489/json-web-token-jwt-benefits-over-a-database-session-token) – zero298 Jul 10 '18 at 14:56
1 Answers
1
Main benefit from JWT is speed, you can verify the token to check if the user can access the resource and retrieve basic user information without doing any database query.

Gabriel Bleu
- 9,703
- 2
- 30
- 43
-
You are just right. Maybe I was not explained this good enough. Why should I use JWT plugin in order to sign instead of using the cyrpto node.js core module and just sign it by myself, why I need more middle dependency? I would love to use how few dependencies as I can – Raz Buchnik Jul 11 '18 at 05:26
-
1