← 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?
- A.JWTs cannot expire
- B.The server does not store JWTs, so a token stays valid until its exp unless extra revocation is added
- C.Sessions cannot be deleted
- 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 →