Kai Ole Hartwig

sylius-auth-md — one source for auth.md and agent_auth.

The bundle serves /auth.md and assembles the document from the installed authentication methods. The same descriptors feed the agent_auth block of the OAuth metadata. If no method is registered, the route answers 404.

Two versions of the same information drift apart as soon as one of them changes.

An agent that wants to find out how to authenticate with your shop reads two things: the prose document at /auth.md and the machine-readable agent_auth block of the OAuth metadata. If both are maintained separately, they drift apart — it is enough for one of the two sides to change. The agent then believes the wrong one and fails without anyone finding out: there is no error that surfaces anywhere, only a login that never happens.

That is why /auth.md is not stored but generated. Both outputs come from the same descriptors of the installed authentication methods. A method you add or remove therefore changes both versions at once — drift is no longer a matter of discipline but structurally impossible.

If no method is registered, the route deliberately returns 404 rather than an empty document. An auth.md that names no way in is not neutral information — to an agent it reads as “this shop rejects agents”. The absence of the file is the more honest answer: nothing has been configured here yet.

Generated instead of maintained — auth.md and agent_auth from the same descriptors

Sylius: 2.0+ · PHP: 8.2+ · Licence: MIT · Version: 1.0.0

Source code & documentation

Composer package

MIT · Sylius 2.0+ · PHP 8.2+

composer require koh/sylius-auth-md

Built, tested and released under MIT. Public distribution via Packagist is being prepared (coming soon).

Part of the family

MIT

This package is part of koh/sylius-agent-ready — seventeen bundles that make a Sylius shop usable for AI agents. Each one works on its own.

To the overview
Part of the family