Pcornel
Identity · Single Sign-On & Federation

OAuth 2.0

Cheat sheet · https://pcornel.dk/topic.php?topic=4494

Back to the Topic

Answer

OAuth 2.0 is an authorization framework that lets an application get limited access to an API on a user's behalf through access tokens, without handling the user's password. Use authorization code with PKCE.

Remember

  • Use authorization code flow with PKCE.
  • Implicit flow is deprecated.
  • Tokens must be scoped minimally.

First checks

  • curl -s https://<as>/.well-known/oauth-authorization-server — metadata
  • Registered redirect URIs — exact match
  • Granted scopes per client — least privilege

Verify in this order

client → authorize (code + PKCE) → token → API

Where it usually breaks

First mismatch in identity lifecycle → authenticator/credential → IdP/federation/session → authorization policy → target resource → audit trail; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4494

Confirmation

Confirm action

Continue?