Beginner System Design
Q40 / 100

What is the difference between a "session" and a "token" (e.g., JWT) for authentication?

Correct! Well done.

Incorrect.

The correct answer is A) Sessions typically store state on the server and reference it with an ID; tokens like JWTs carry the data themselves and can be verified without server-side storage

A

Correct Answer

Sessions typically store state on the server and reference it with an ID; tokens like JWTs carry the data themselves and can be verified without server-side storage

Explanation

Session-based auth stores state server-side (e.g., in Redis), while token-based auth (JWT) embeds claims in a signed token the client holds, enabling stateless verification across servers.

Progress
40/100