🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: JWT and API Security: all 10 questions

Quiz: JWT and API Security · Question 9 of 10

Compared with server sessions, what is a main weakness of JWTs?

Compared with server sessions, what is a main weakness of JWTs?

  1. A.They need a database lookup on every request
  2. B.They are hard to revoke before they expire, so logout is not instant
  3. C.They cannot be used by mobile apps
  4. D.They cannot hold a user id
Answer & explanation

Correct answer: They are hard to revoke before they expire, so logout is not instant

Use short expiry, refresh-token rotation or a deny-list of revoked tokens.

Can you get the rest right without peeking?

Take the timed Quiz: JWT and API Security quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →