A Step-Up Challenge Is a 401, and Your Client Needs a Loop Guard

RFC 9470 lets an API tell a client that its access token was obtained with too weak or too old a login. Reading the RFC section by section, then building a toy server and client, shows what the document specifies (a 401 challenge, two parameters) and the three things it leaves to you: concurrent challenges, loops, and caches.

September 15, 2026 | 10 min

A WebSocket Origin Check Blocks Other Websites, Not Other Clients

The Origin header on a WebSocket handshake is set by browsers and can be set to anything by every other client. So an allow-list protects a cookie-authenticated browser session from other sites, and it proves nothing about who is connecting. A runnable server, a real headless-browser attack, and the handshake rule that follows.

September 10, 2026 | 10 min

Enable Refresh Token Rotation and Parallel Requests Can Log Users Out

Refresh token rotation turns a reused token into a theft alarm. A client that fires three requests with an expired access token and refreshes once per 401 presents the same refresh token three times, and trips that alarm on itself. This post breaks a naive client on purpose, fixes it with single-flight refresh and a stale check, and compares the alternatives: a server grace window, request gating, proactive refresh and sender-constrained tokens.

August 30, 2026 | 13 min

When a WebSocket Outlives Its Token

After the 101 response, no request carries credentials: the server remembers a verdict, not the evidence. This article follows one token through a browser handshake, shows what a page can and cannot see, and compares three ways to renew it (reconnect, in-band, out-of-band) with a runnable server, tests, and a headless-Chrome check.

August 21, 2026 | 20 min

Separate Authentication from What an Actor May Do

Designing API authentication and role-based authorization with actors, route permissions, and separate credentials for people and machines.

August 11, 2026 | 14 min