Question 4 of 10Pro Only

Explain the difference between authentication and authorization in APIs. How do OAuth 2.0 and JWT work, and when would you use each?

Sample answer preview

## Authentication vs Authorization **Authentication** answers: "Who are you?" **Authorization** answers: "What are you allowed to do?" ``` 1. User logs in with email/password → Authentication 2.

authenticationauthorizationJWTOAuth 2.0access tokenrefresh token

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Full-Stack Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime