InterviewStack.io LogoInterviewStack.io

API Security, Authentication and Authorization Questions

Controlling who can call an API, what they may do, and defending it against abuse. Covers the access-control mechanics: API keys, OAuth 2.0 flows, OpenID Connect, JWT issuance/validation, session vs. token auth, scopes/roles for fine-grained authorization, token lifetime and refresh, mutual TLS, and machine-to-machine vs. user-delegated access. Also covers the adversarial hardening view: input validation, injection and deserialization risks, broken object-level authorization (BOLA), mass assignment, secrets handling, and the OWASP API Security Top 10, plus securing data in transit, preventing enumeration/scraping, and testing APIs for vulnerabilities.

EasyTechnical
62 practiced

Explain the core OAuth 2.0 roles (resource owner, client, authorization server, resource server) and the common flows. For each actor below map the role and justify the flow choice:

  • mobile app
  • backend API
  • third-party web app
  • end user

Also explain when to use Authorization Code (with PKCE), Client Credentials, and when to avoid the Implicit flow.

MediumSystem Design
92 practiced

How would you design a secure refresh-token strategy for a Single Page Application (SPA) with a backend API serving 1M users? Requirements: mitigate refresh-token theft, enable revocation, minimize user friction, support refresh-token rotation and offline access. Describe storage, rotation, revocation lists or introspection, and trade-offs between stateless and stateful approaches.

That is every published API Security, Authentication and Authorization question for Mobile Developer so far. Browse the other topics in this category, or practice this one interactively.