Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 7 · Authorisation · access without the password

OAuth 2.0

Delegated authorisation

OAuth is how you let an app do something on your behalf without giving it your password. You approve a specific, limited permission at the provider itself, the app receives a token rather than a credential, and that token can be scoped, expired and revoked.

OAuth grants an app a scoped, revocable token instead of your password — it answers “what may this app do?”, not “who are you?”

Answers
Authorisation
not authentication
Issues
Access tokens
+ refresh tokens
Flow
Auth code + PKCE
the one to use
Version
2.0 / 2.1
1.0 is unrelated

How it works

The authorisation code flow, with PKCE
The appThe provider
1 · Redirect the user to the provider
GET /authorize?client_id=…&scope=read:files&code_challenge=…
The app never sees the login — the user authenticates at the provider itself
2 · The user approves, a code comes back
Redirect back with ?code=abc123
A short-lived, single-use code — useless on its own without the verifier
3 · Exchange the code for a token
POST /token with the code and code_verifier → access_token + refresh_token

PKCE binds the code to the app that started the flow, so an intercepted code cannot be redeemed by anyone else. The app ends up with a token limited to the scopes the user actually approved.

The main points

What OAuth 2.0 does, step by step

1
Ask for specific scopes

The app redirects to the provider naming exactly what it wants — read:files, not everything.

2
The user approves at the provider

Authentication and consent happen on the provider’s own page; the app never handles the password.

3
Redeem the code

The app exchanges the one-time code, plus its PKCE verifier, for an access token at the token endpoint.

4
Use, refresh, revoke

The access token is short-lived; a refresh token renews it, and the user can revoke both at any time.

Flows, good and retired
Auth code + PKCE — the answer for every client type
Client credentials — machine to machine, no user
Device code — TVs and things with no keyboard
Implicit — retired — tokens in the URL
Password grant — retired — defeats the point
Refresh token — renew without asking again

In cybersecurity

OAuth is a framework, not a finished protocol — most breaches come from implementing an optional part badly, or using a flow that should have been retired.

Exact redirect URIs

Wildcard or partial matching lets an attacker have the code delivered to their own site.

PKCE everywhere

Not just for mobile — OAuth 2.1 makes it mandatory for confidential clients too.

The state parameter

Without it, an attacker can graft their own authorisation onto a victim’s session — CSRF on the callback.

Never the password grant

Handing the app your credentials is precisely what OAuth exists to avoid.

Consent phishing

A convincing app asking for sweeping scopes is a real attack — users approve without reading.

Not authentication

A valid token proves access was granted, not who the user is. That is what OIDC adds.

Rides in the stack

TCPTLSHTTPOAuth 2.0

Ordinary HTTPS requests and redirects — OAuth adds no wire protocol of its own, only endpoints and parameters.

Works with

OIDCSAML

Tokens & roles

Tokens
Accessshort-lived
Refreshrenews it
Codesingle use
Scopethe limit
Roles
Resource ownerthe user
Clientthe app
Auth serverissues tokens
Resource serverthe API