Serve the OAuth client metadata document

A public client identifies itself to the provider with a hosted
Client ID Metadata Document. Serve it unauthenticated and outside the
auth group, since the provider fetches it server-to-server, exposing the
deployment-derived client_id and redirect_uri alongside the Probo brand
name, homepage and logo.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-05-29 12:23:57 +02:00
parent cd8ddd8db5
commit 7c11a0f607
3 changed files with 152 additions and 0 deletions

View File

@@ -128,6 +128,12 @@ func NewMux(
)
})
// Public, unauthenticated: the OAuth Client ID Metadata Document (CIMD)
// is fetched server-to-server by public-client providers (PostHog)
// during authorization, with no Probo credentials. Mounted outside the
// auth group above.
r.Get("/connectors/oauth-client-metadata", handleConnectorOAuthClientMetadata(baseURL))
return r
}