CYBER LIBRARY
Explore the bootcamp
Security essentialsIntermediate

OAuth 2.0 security

OAuth 2.0 delegates access through tokens and defined authorization flows.

3 min readUpdated 12 Oct 20265 connections
Markdown

What it means

OAuth 2.0 delegates access through tokens and defined authorization flows. It is not, by itself, a complete user authentication protocol. Security depends on the chosen flow, registered redirect destinations, token handling, client properties, and protections against interception and replay.

A practical example

A client uses an authorization-code flow with appropriate protections and sends an access token only to its intended API. It does not treat an arbitrary access token as a reliable login assertion or expose long-lived credentials in browser-visible locations.

What to check

Use current protocol guidance, constrain redirect URIs, bind authorization responses to the initiating flow, and review token audience and scope. Prefer maintained libraries and test failure and replay paths.

A common pitfall

Confusing OAuth with OpenID Connect can cause an application to infer identity from the wrong token or endpoint. Delegated access and user authentication require distinct protocol decisions.

Think it through

Why distinguish an access token from an identity token?

Answer: They serve different recipients and purposes; using one as the other can create invalid trust assumptions.

Delegation has several participants

A fictional calendar service lets a scheduling app read a user's free times. The user authorizes access through an authorization server, the scheduling app receives a credential under the selected flow, and the calendar API enforces the resulting grant. Naming these participants prevents the common assumption that one token is simply a universal proof of login.

The client has its own properties. A public client cannot safely keep a shared secret merely because its source code contains a value called client-secret. A server-side confidential client can protect credentials differently. Choose a supported flow that fits the client and use current security guidance rather than reusing an older integration pattern unchanged.

Redirect-based flows require the browser to return to an expected destination and the response to belong to the initiating interaction. Protect the authorization code exchange, avoid exposing tokens to unintended recipients, and constrain the permissions granted. Each of those decisions closes a different route to misusing delegated access.

Draw the intended token journey

For the calendar example, label the authorization server, client, browser, and resource API on a diagram. Mark where the authorization code and access token appear, which participant consumes each, and what permission the user grants. Then add a second unrelated API and explain why the calendar token should not be accepted there.

Operationally, users need a way to inspect and withdraw integrations. Logs should help investigate grants without recording raw bearer credentials. Review expiry, refresh behavior, and incident revocation before launching the integration. Delegation is a continuing relationship with a defined permission set, not a one-time consent screen that makes later access automatically safe.

GO TO THE SOURCE

References & further reading

Original explanations, with primary references for deeper study.

OWASP: OAuth2IETF RFC 9700: OAuth 2.0 Security Best Current Practice
EXPLORE THIS IDEA’S CONNECTIONS

A small part of a bigger picture.

6 notes · 10 connections
100%
OAuth 2.0 security · depth 1
Drag to pan · Pinch or use +/− to zoom · Click to preview · Double-click to read
Browse notes as a list (6)
FOLLOW ANOTHER THREADExplore the rest of the library
Start with a concept. Follow its connections.
Detection & responseAbuse Elevation Control MechanismElevation-control abuse bypasses or misuses mechanisms governing privileged execution.Making change happenAcceptance criteriaDefine observable conditions for a deliverable to be accepted.Security essentialsAccess controlUnderstand subjects, resources, permissions, and enforcement through a shared-drive example, including how access changes over time.Detection & responseAccess Token ManipulationAccess token manipulation changes or adopts operating-system security contexts.Risk & resilienceAccount Access RemovalAccount access removal disrupts legitimate users by changing, deleting, or restricting their identities.Evidence & investigationAccount DiscoveryAccount discovery enumerates identities available in a system or environment.Detection & responseAccount ManipulationAccount manipulation changes identity settings to preserve or expand access.Adversarial thinkingAcquire InfrastructureInfrastructure acquisition obtains domains, servers, or other resources used to support operations.Adversarial thinkingActive ScanningActive scanning probes target infrastructure to learn reachable services or weaknesses.Security essentialsAdversary in the middleAn intermediary may observe or alter a communication path.Security essentialsAESA symmetric block cipher whose safe use depends on its mode and implementation.Making change happenAgile deliveryUse short feedback cycles to adapt toward a useful outcome.