Support setting `registration_endpoint` metadata via option.
Preflight Checklist
- [x] I could not find a solution in the existing issues, docs, nor discussions
- [x] I have joined the ZITADEL chat
Describe your problem
As defined in OIDC RFC, a provider using Dynamic Client Registration is recommended to expose registration_endpoint metadata. However we can't define it within the lib for a provider -- even if present in the codebase for the discovery: https://github.com/zitadel/oidc/blob/d6e37fa74115f3f19fa4cd3e42a9dd1d5b1a9944/pkg/oidc/discovery.go#L39
Describe your ideal solution
Add support for registration_endpoint in https://github.com/zitadel/oidc/blob/d6e37fa74115f3f19fa4cd3e42a9dd1d5b1a9944/pkg/op/op.go#L177-L187 and the associated custom option like this or allow adding custom metadata in openid-configuration endpoint
Version
main
Environment
Self-hosted
Additional Context
Happy to raise a PR for it.
We at Zitadel (currently) have no need for this feature, so it's moved to the backlog until popular demand requires the feature.
We are open for a PR. In order to add the endpoint to the library, the op.Server interface needs to be extended. Implementers can than define their own business logic to implement the feature.
Yes I would like to see this feature too!
Submitted a PR: https://github.com/zitadel/oidc/pull/782