Skip to content

oauth

AI security interview questions tagged oauth, across every topic.

19 questions · 3 unlocked for you

Concepts behind "oauth"

Explanations of the mechanisms these questions rely on.

Foundational
Identity & Access
OAuth 2.0 and PKCEOAuth 2.0 is a framework for delegated authorization: a user lets an application access a resource on their behalf, with limited scopes, without sharing their password. The authorization code flow sends the user to the authorization server, returns a short-lived code, and exchanges it for tokens. PKCE binds code redemption to a per-flow verifier: someone who steals only the code cannot redeem it. This is not proof of an installed app's identity. Current best practice uses the code flow with PKCE for every client type.
Foundational
Agent & MCP Security
MCP SecurityMCP connects an AI application to servers offering tools, resources and prompts. Review what the host puts into model context, what local processes can reach, and which identities and permissions govern remote calls. Metadata approval, transport authentication and authorization of a concrete operation are separate controls.
Core
Identity & AccessSign in
OpenID Connect and ID TokensOpenID Connect is an identity layer on top of OAuth 2.0. Alongside an access token for APIs, it returns an ID token: a signed JWT stating who the user is, who issued the statement, which client it is for, and when it expires. The client validates it and creates its own session. Confusing ID tokens with access tokens, or skipping audience and nonce checks, are the classic mistakes.
Core
Mobile SecuritySign in
Signing In From a Mobile App: OAuth for Native AppsA mobile app cannot keep a client secret, so OAuth treats it as a public client. RFC 8252 sets the pattern: run the login in the system browser or a platform authentication session, never an embedded WebView; receive the code on a redirect the OS verifies, such as an App Link or universal link; and protect the code with PKCE using S256. RFC 9700 adds that public clients must use PKCE and that their refresh tokens must be rotated or bound to a key, which on a phone can live in secure hardware.
Advanced
Identity & Access🔒 Premium
Validating JWTs SafelyA JSON Web Token is a signed (sometimes encrypted) set of claims, whose safety depends on explicit verifier policy. Safe validation pins the allowed algorithm to each key, selects keys only from the configured issuer's key set, checks the token type, issuer, audience and time claims, treats header fields such as kid and jku as untrusted input, and keeps different token kinds mutually exclusive. Key rotation needs a schedule that accounts for cache lifetimes, token lifetimes and clock leeway.
Advanced
Identity & Access🔒 Premium
Sender-Constrained Tokens: DPoP, mTLS and Token ExchangeA bearer token is honoured for whoever presents it, so a leaked token is a working credential. Sender-constrained tokens carry a confirmation claim naming a key, and the resource server checks that the caller proves possession: DPoP with a signed proof per request, mTLS with the client certificate on the connection. Binding stops replay of an exfiltrated token; it does not stop code that runs where the key is, or a forged token. Token exchange (RFC 8693) issues each hop a new, narrower, audience-bound token instead of passing one along.