Mediated Sign-In
Some companies can't offer Direct or Device Sign-In yet. They declare the fields
they need in the mediated-sign-in extension, and the personal agent sends what
the user types to the issuer's token endpoint, as an OAuth extension grant. It is
the one sign-in where a password passes through the agent's host, so the SDK narrows what the
host can do with it. The paired examples run the real MediatedSignInClient
against Manzanita Outfitters, which asks for an email, a password, and then a
one-time code. Mediated Sign-In is transitional, like OAuth's password grant:
a company offers it only until it can add Direct or Device Sign-In, and the
protocol plans to remove it at a date set with version 1.0.
The walkthrough also shows the refusals:
- A field named like a parameter of the grant, such as
client_id, isinvalid_mediated_extension, raised before the user is asked anything. - The protected input must answer exactly the declared fields, none empty.
- Only the
client_idthat started a sign-in can finish it: the company answers anyone elseinvalid_grant. - A wrong code is
code_requiredagain with the same reference; the company ends the sign-in withinvalid_grantafter its attempt limit.
The model sees field labels, which fields are secret, the company's domain, the masked destination of the code, statuses, and granted scopes. The credentials and the code exist only in the host's protected input and in the one token request; the access and refresh tokens stay in Reactor stores.
TypeScript: new MediatedSignInClient({ reactor, fetch }) with signIn() and
submitCode(), the trusted surface contributed at ProtectedInputs.
- Run the Pydantic AI example.
- Run the Agent Runtimes example.
- Read the Mediated Sign-In guide.