Bird
0
0

Which NestJS package is essential to implement a JWT strategy?

easy📝 Conceptual Q2 of 15
NestJS - Authentication
Which NestJS package is essential to implement a JWT strategy?
A@nestjs/config
B@nestjs/jwt
C@nestjs/typeorm
D@nestjs/mongoose
Step-by-Step Solution
Solution:
  1. Step 1: Identify JWT related packages

    @nestjs/jwt provides utilities to sign and verify JWT tokens.
  2. Step 2: Exclude unrelated packages

    @nestjs/mongoose and @nestjs/typeorm are for databases; @nestjs/config is for configuration management.
  3. Final Answer:

    @nestjs/jwt -> Option B
  4. Quick Check:

    JWT package = @nestjs/jwt [OK]
Quick Trick: Use @nestjs/jwt for JWT token handling [OK]
Common Mistakes:
  • Choosing database or config packages instead of JWT
  • Confusing @nestjs/jwt with other packages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NestJS Quizzes