Ctrl K
Backend · Senior · Theory

You're choosing between stateless JWTs and server-side sessions for a web application and a mobile client. How would you make the decision?

~4 min by voice

How to approach it

This checks whether the candidate understands the real trade-offs between JWTs and sessions: revocation, client-side storage, XSS/CSRF and signature security. The point isn't "JWT is trendy," but a reasoned choice for the web and the mobile client.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsYou're choosing between server-side sessions and JWTs for authentication in a web application. How will you choose, and what problems will you run into with each approach? Mid-levelYou have an endpoint, GET /orders/{id}, that requires authorization and returns an order. A security review said there's a hole in it. What's the most likely problem, and how do you close it? Mid-levelWhat is SQL injection, and how do you protect against it? JuniorWhat's the difference between authentication and authorization? And once a user has logged in, how does the server know who's making a request? Junior

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~4 min