OAuth
A protocol for granting one application limited access to a user's data on another, without handing over the user's password.
OAuth is a protocol for delegated authorization: it lets a user grant one application access to their data on another — a calendar app reading a user's Google Calendar, a resume builder reading their LinkedIn profile — without that user ever typing their password into the requesting app. The requesting app gets a scoped, revocable token instead of a credential, which is the entire point.
The flow that matters, the authorization code grant, runs through a redirect: the app sends the user to the provider's own login page, the user authenticates there and approves specific scopes, the provider redirects back with a short-lived code, and the app exchanges that code (server-to-server, with its own client secret) for an access token. The user's password never touches the requesting app's servers at any point in that sequence — a deliberate design, not an incidental one, since the whole protocol exists to avoid password sharing between services.
A precise and commonly blurred point: OAuth is an authorization protocol — it answers "what is this app allowed to do" — not an authentication protocol — "who is this user." Using a raw OAuth access token to decide who's logged in is a category error that OpenID Connect exists to fix, layering an identity token (a JSON Web Token containing the user's identity claims) on top of the same OAuth flow. "Login with Google" is OpenID Connect, not bare OAuth, even though it rides the same redirect dance.
The access token itself is usually opaque to the client and short-lived, paired with a longer-lived refresh token the app can exchange for new access tokens without asking the user to log in again — which is what lets "stay logged in" coexist with tokens that expire in an hour.
See also4
JSON Web Token
A signed, self-contained token that carries claims a server can verify without a database lookup.
Web Platform12 connections
Same-Origin Policy
The browser rule isolating documents by scheme, host, and port, and the mechanisms for relaxing it.
Web Platform30 connections
Cross-Origin Resource Sharing
The mechanism by which a server opts in to letting scripts on other origins read its responses.
Web Platform9 connections
Content Security Policy
An HTTP header that tells the browser which sources of script, style, and other content a page is allowed to load.
Web Platform14 connections
Related3
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from8
- ClickjackingWeb Platform
Tricking a user into clicking something on another site by loading it invisibly in a frame beneath a decoy, and the headers that stop a page from being framed.
- Cross-Origin Resource SharingWeb Platform
The mechanism by which a server opts in to letting scripts on other origins read its responses.
- JSON Web TokenWeb Platform
A signed, self-contained token that carries claims a server can verify without a database lookup.
- Open RedirectWeb Platform
A page that forwards visitors to whatever address a URL parameter names, letting attackers borrow a trusted domain to launch phishing or steal sign-in tokens, and the narrow ways to fix it.
- PhishingWeb Platform
Tricking people into handing over passwords, money, or access with messages and websites that impersonate someone they trust, the most common way attackers get in, and why technical defenses beat training.
- Record and ReplayTesting & Verification
Capturing real network responses once and replaying them in later test runs, which makes tests fast and deterministic but lets the recordings drift from the real service.
- Single Sign-OnWeb Platform
Signing in once with a central identity provider and being trusted by many separate applications, through signed assertions passed by browser redirects, which concentrates both convenience and risk in one place.
- Time to LiveNetworks & Distribution
A limit on how long something may live, counted in hops or seconds, which keeps lost packets from circling forever and tells caches when their copies go stale.