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

Quiz: Authentication, Sessions and JWT · Question 7 of 10

Why is logging a user out immediately harder with JWTs than with server-side sessions?

Why is logging a user out immediately harder with JWTs than with server-side sessions?

  1. A.JWTs cannot expire
  2. B.The server does not store JWTs, so a token stays valid until its exp unless extra revocation is added
  3. C.Sessions cannot be deleted
  4. D.JWTs are stored in the database
Answer & explanation

Correct answer: The server does not store JWTs, so a token stays valid until its exp unless extra revocation is added

With sessions, deleting the record ends access at once; JWTs need short lifetimes and refresh-token revocation.

Can you get the rest right without peeking?

Take the timed Quiz: Authentication, Sessions and JWT quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →