What is the difference between authentication and authorization?

Technical
Easy
Flipkart
140.5K views

This security question checks your understanding of user verification and permission management.

Why Interviewers Ask This

Security is paramount in e-commerce. Interviewers want to ensure you can distinguish between verifying identity and granting access rights. Confusing these concepts can lead to critical security vulnerabilities in application design.

How to Answer This Question

Define authentication as proving who you are (e.g., password). Define authorization as what you are allowed to do (e.g., admin panel). Use a hotel analogy: ID check vs room key. Mention OAuth or JWT tokens.

Key Points to Cover

  • Identity verification
  • Permission assignment
  • Security layers
  • Token usage

Sample Answer

Authentication verifies the identity of a user, typically through credentials like passwords or biometrics. Authorization determines what resources or actions an authenticated user is permitted to access. For example, logging in is authentication, while viewing a purchase history is authorization. Both are essential for secure systems to ensure only legitimate users access sensitive data.

Common Mistakes to Avoid

  • Treating them as synonyms
  • Ignoring token lifecycle
  • Confusing roles with identities

Practice This Question with AI

Answer this question orally or via text and get instant AI-powered feedback on your response quality, structure, and delivery.

Start Practicing

Related Interview Questions

Browse all 78 Technical questionsBrowse all 52 Flipkart questions