Posts tagged “oauth”

  1. API keys, OAuth client credentials or mTLS: how should services authenticate?

    API keys are simple and fine for low-risk public APIs if they're hashed, scoped and rotatable. OAuth client credentials give short-lived, scoped tokens and central control. Mutual TLS proves identity at the connection level and suits internal service meshes. Signed requests (HMAC) protect…

    · 6 min read · Security

  2. OAuth 2.0 and OpenID Connect: which flow for which client?

    Authorization code with PKCE for anything with a user (web, SPA, mobile, desktop), client credentials for machine-to-machine, the device flow for TVs and CLIs. The implicit and password grants are retired. OAuth is about access to APIs; OpenID Connect adds who the user is. Diagrams of each flow.

    · 6 min read · Security

  3. Access tokens and refresh tokens: why two, where do they live, and what happens when one leaks?

    Why two tokens: a short-lived access token shown to every API, and a longer-lived refresh token shown only to the auth server and rotated, so reusing a stolen one raises an alarm. Diagrams of the flows, where to store each token on web, mobile and server, and what an attacker gets from each kind…

    · 7 min read · Security