testRegistryClientMetadataFollowsTheAddress
tcmts.registry.test.testRegistryClientMetadataFollowsTheAddress · #m7quqylx · term
import { client } from "#codebase/tcmts/registry/http/oauth";
export const testRegistryClientMetadataFollowsTheAddress = () => {
const doc = client(new Request("https://registry.example/api/oauth/client"));
if (doc.client_id !== "https://registry.example/api/oauth/client")
throw new Error(`client_id ${String(doc.client_id)}`);
if (JSON.stringify(doc.redirect_uris) !== '["https://registry.example/"]')
throw new Error(`redirect_uris ${JSON.stringify(doc.redirect_uris)}`);
if (doc.scope !== "atproto repo:codes.tcm.star") throw new Error(`scope ${String(doc.scope)}`);
}
uses