CodeWithJay

The Only Way to Handle Refresh Tokens in NestJS (Production Guide) E-7

43 min979 views

The Only Way to Handle Refresh Tokens in NestJS (Production Guide) E-7

About this video

Fifteen-minute tokens are safer, but nobody wants to log in four times an hour. Refresh tokens square that circle, and this episode builds the whole flow.

We add rotating refresh tokens with their own secret and TTL, build Passport JWT strategies and the JwtAuthGuard, write the CurrentUser decorator, and finish with refresh and logout endpoints. Rotation, expiry, and revocation are all covered, not hand-waved.

Subscribe to Code with Jay and keep building.

Keep learning NestJS

Every free video, mini course and project-based course on NestJS in one place, in the order that makes sense.

All videos