Agent-grade OAuth
DPoP, device flow and passkeys for AI agents.
An agent needs more than a bearer token. This page shows which standards theAuth uses to bind tokens to a key, let a person approve a sensitive call and sign in the humans behind each agent, and how far each one has shipped in Go and TypeScript.
What is covered and where
| Standard | What it does | Go | TypeScript |
|---|---|---|---|
| RFC 9449 DPoP | Access tokens bound to a client key, so a stolen token is useless without the private key. | Beta | Not found in core |
| RFC 8628 device authorization | A code shown on a CLI or headless client and entered on another device. | Stable | Beta |
| RFC 9509 CIBA | An agent asks, a person approves out of band. Needs memory or Postgres storage. | Supported | Check the matrix |
| Passkeys (WebAuthn) | Discoverable passkeys for the people who own agents. | Stable | Beta |
Status comes from the feature matrix, which links the source file for each row. It changes as releases ship.
How they fit together
The MCP OAuth 2.1 server issues scoped tokens with PKCE S256. DPoP makes those tokens sender constrained. CIBA lets an agent identity pause until a person approves. The device grant covers CLIs and headless tools, and passkeys sign in the people who own the agents. Building in Go? See the Go authentication library, or follow the TypeScript MCP guide.
Common questions
Does theAuth support DPoP?
In theauth-go, yes: DPoP (RFC 9449) binds access tokens to a client key and is in beta, behind its own config field. In the TypeScript library we did not find a DPoP implementation in core, so check the feature matrix before relying on it there.
Can an AI agent use the device flow?
The device grant (RFC 8628) lets a CLI or headless client show a code that a person enters on another device. It is stable in Go and beta in TypeScript. For an agent that must wait for a human decision on a single action, CIBA is the closer fit, and it is in the Go library.
Are passkeys supported?
Yes. Passkeys (WebAuthn) are stable in theauth-go and beta in the TypeScript core. They sign in the person who owns an agent. The agent itself uses a scoped token, not a passkey.
Which of these should I turn on first?
Start with PKCE S256 and scoped tokens, which every MCP client expects. Add DPoP when a leaked token would be costly, and CIBA when an agent should ask a person before a sensitive call.
Get started
Give your first agent an identity.
Install the package, create an agent with scoped permissions, and read its first audit record. The core runs on Postgres, SQLite, MySQL or D1, and the Go module needs a single go get.
npm install @glinr/theauthgo get github.com/glincker/theauth-go/v2