Authdog

Custom channel auth for Vercel AI SDK

Last updated Oct 22, 2026
View as Markdown

The tool reads toolsContext. require_auth on your API is the gate. The AI SDK does not decide who the caller is.

Getting started, including the planned sample, is Vercel AI SDK.

What fails closed

The route with no token is 401. execute with an empty token does not return a subject.

The route with a bearer userinfo accepts returns { subject: "<id>" }. That string is the tool result.

A resolved subject is not authorization. Scopes and allowed tools are a later check. The trust-store sample is that later check for MCP. This page stops at admission.

Read To learn how to
Vercel AI SDK See the hook
API keys and M2M for Vercel AI SDK Where the secret is allowed to live
Authorizing tool calls for Vercel AI SDK What happens after the subject is known

Learn more