Jonatan Matajonmatum.com
conceptsnotesexperimentsessays
© 2026 Jonatan Mata. All rights reserved.v2.1.1
Concepts

OAuth & OIDC

Industry standards for delegated authorization (OAuth 2.0) and federated authentication (OpenID Connect), enabling third-party login and secure API access.

seed#oauth#oidc#authentication#authorization#jwt#identity

What it is

  • OAuth 2.0: authorization protocol allowing applications to access resources on behalf of a user without knowing their credentials
  • OpenID Connect (OIDC): identity layer on top of OAuth 2.0 adding authentication

OAuth 2.0 flows

FlowUse
Authorization CodeWeb apps with backend
Authorization Code + PKCESPAs, mobile apps
Client CredentialsMachine-to-machine
Device CodeDevices without browser

Tokens

TokenPurposeDurationStandard
Access TokenAuthorizes resource accessShort (minutes-hours)OAuth 2.0
Refresh TokenObtains new access tokensLong (days-weeks)OAuth 2.0
ID TokenContains user informationShortOIDC (always JWT)

JWT (JSON Web Token)

Common token format: header.payload.signature. Allows verifying integrity without calling the authentication server.

Providers

  • Auth0, Okta (SaaS)
  • AWS Cognito, Azure AD B2C (cloud)
  • Keycloak (open-source)

Why it matters

OAuth 2.0 and OpenID Connect are the authentication and authorization standards of the modern web. Implementing them correctly protects users and the application. Implementing them poorly creates vulnerabilities that attackers know well.

References

  • OAuth 2.0 — Specification.
  • OpenID Connect — Specification.
  • RFC 6749 — OAuth 2.0 — IETF, 2012. Original OAuth 2.0 specification.

Related content

  • API Design

    Principles and practices for designing clear, consistent, and evolvable programming interfaces that facilitate integration between systems.

  • AWS IAM

    AWS identity and access management service controlling who can do what in your account, with granular policies based on the principle of least privilege.

  • Zero Trust

    Security architecture that rigorously verifies every request regardless of origin, eliminating implicit trust in internal networks.

  • API Gateway Pattern

    Pattern providing a single entry point for multiple microservices, handling routing, authentication, rate limiting, and response aggregation.

Concepts