OAuth 2.0
— Open Authorization 2.0OAuth 2.0 allows users to grant websites or applications access to their information on other websites (e.g. "Log in with Google" or allowing a tool to access your GitHub repositories) without handing over their actual passwords.
Interactive Session: How OAuth 2.0 Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of OAuth 2.0.
Threat Model & Attack Simulation
How this protocol is attacked in practice, what defenders can see, and which control stops it.
Threat model & attack simulation
SimulatedDefensive education. Every step runs in this page; no traffic is generated or sent.
Access token theft and scope abuse
Credential attackA leaked bearer token is replayed until it expires, and broad scopes widen the damage.
Obtain a token
The token leaks through logs, a compromised client or an insecure redirect.
Tokens used from a new IP or device.
Account data disclosure and actions as the victim.
Defences that matter
- Short-lived tokens with sender constraints
- Least-privilege scopes and consent
- Token binding, rotation and revocation
This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.
Protocol Specification & Architecture
Key characteristics, real-world deployment patterns, and trade-offs.
Core Technical Features
- Authorization Code Flow with Proof Key for Code Exchange (PKCE)
- Short-lived Access Tokens and long-lived Refresh Tokens
- Granular permission scopes (e.g. `read:user`, `repo:status`)
- Four roles: Resource Owner, Client, Authorization Server, Resource Server
Real-World Use Cases
- Third-party API integration access (Google Drive, Slack, GitHub)
- Single Sign-On (SSO) delegation architectures
- Mobile app backend authorization
Advantages & Strengths
- Users never expose passwords to third-party apps
- Permissions can be revoked selectively at any time
Limitations & Vulnerabilities
- Vulnerable to token theft or redirect URI manipulation if PKCE and HTTPS are not strictly enforced