Skip to main content
InterviewHubPRO
Section Overview
Q26

Question 26 of 50

Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

52%
ASP.NET Core & Web API (50 Qs)•Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

How does JWT Authentication and Refresh Token Rotation work in ASP.NET Core?

senior LevelMost AskedSecurity & AuthSystem Design

In Simple Words:

  1. Configure builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(...).
  2. Validate Issuer, Audience, IssuerSigningKey, and clock skew.
  3. Access tokens expire quickly (15 mins).
  4. Refresh tokens are stored in the database with a family ID. On refresh, the old token is invalidated and a new pair is issued (Refresh Token Rotation). If an already-used refresh token is presented, the whole family is revoked (detecting token theft).