nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

JWT/Security

JWTs are easy to use, but small security mistakes can turn them into a serious authentication problem.

20 QuestionsAdvancedHigh Priority ~14 min read

A JWT is only as secure as the way your application creates, stores, sends, and verifies it. Problems such as weak signing secrets, accepting unexpected algorithms, ignoring expiration, storing tokens unsafely, or putting sensitive information in the payload can create vulnerabilities.

JWT security also involves thinking about token theft and revocation. Short-lived access tokens, secure token storage, refresh-token rotation, HTTPS, strong cryptographic keys, and careful validation can reduce the impact if a token is compromised.

What you'll walk away knowing

Why JWT payloads should not contain secrets
How signing algorithms and keys affect token security
How token theft and XSS or CSRF risks affect storage decisions
How expiration, refresh tokens, rotation, and revocation improve security
1How do role changes propagate?Intermediate2Why not make access tokens valid for 30 days?Intermediate3Explain Access Token and Refresh Token architecture.Intermediate4Why is storing JWT in localStorage considered risky?Intermediate5What attacks are possible against JWT implementations?Advanced6LocalStorage vs HttpOnly cookies?Intermediate7JWT is stateless. Then how do you logout users?Intermediate8RS256 vs HS256?Intermediate9How would you implement refresh token rotation?Intermediate10How do you revoke JWTs?Advanced11How would you revoke millions of JWTs instantly?Advanced12What is the biggest drawback of JWT?Intermediate13User role changes from Admin to User. JWT still says Admin. What do you do?Intermediate
All Topics
1
Basics
Structure
Claims
2
Implementations
Security
3
Microservices
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.