Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aa874d2

Browse files
addding q16
1 parent ce78e67 commit aa874d2

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

‎README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,7 @@
958958
| 14| [What are JWT?](#what-are-jwt)|
959959
| 15| [What are different authentication methods?](#what-are-different-authentication-methods)|
960960
| 16| [What are disadvantages of using session based authentication?](#what-are-disadvantages-of-using-session-based-authentication)|
961+
| 17| [What are disadvantages of using jwt based authentication?](#what-are-disadvantages-of-using-jwt-based-authentication)|
961962
962963
1. ### What is MongoDB?
963964
@@ -1200,17 +1201,30 @@
12001201
**[⬆ Back to Top](#table-of-contents---mongodb-and-mongoose)**
12011202

12021203

1203-
15. ### What are disadvantages of using session based authentication?
1204+
16. ### What are disadvantages of using session based authentication?
12041205

12051206

12061207

1207-
Since data in session state is stored in server memory, it is not advisable to use session state when working with large sum of data. Session state variable stays in memory until you destroy it, so too many variables in the memory effect performance.
1208+
**Compromised Secret Key** : The best and the worst thing about JWT is that it relies on just one Key. Consider that the Key is leaked by a careless or a rogue developer/administrator, the whole system is compromised!<br/>
1209+
**Cannot manage client from the server**<br/>**Cannot push Messages to clients** <br/>**Crypto-algo can be deprecated**<br/>**Data Overhead** : The size of the JWT token will be more than that of a normal Session token<br/>Complicated to understand: JWT uses cryptographic Signature algorithms to verify the data and get the user-id from the token. Understanding the Signing Algo in itself requires basics of cryptography. <br/>
1210+
1211+
1212+
12081213

1214+
**[⬆ Back to Top](#table-of-contents---mongodb-and-mongoose)**
1215+
1216+
1217+
16. ### What are disadvantages of using jwt based authentication?
1218+
1219+
1220+
1221+
**Session based authentication**:<br/> Because the sessions are stored in the server’s memory, scaling becomes an issue when there is a huge number of users using the system at once.<br/>Cookies normally work on a single domain or subdomains and they are normally disabled by browser if they work cross-domain (3rd party cookies). It poses issues when APIs are served from a different domain to mobile and web devices.
12091222

12101223

12111224

12121225

12131226
**[⬆ Back to Top](#table-of-contents---mongodb-and-mongoose)**
12141227

12151228

1229+
12161230

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /