Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Client Props Support
This PR adds support for storing application-specific props on OAuth clients.
Features
1. Client Props Support
Clients can now store application-specific props that are separate from the standard OAuth client registration fields. This allows applications to attach custom data to clients for their own use cases.
propsfield toClientInfo<Props>interface (generic type parameter for type safety. Defaults toanyfor backward compatibility)createClient()or during dynamic client registration viaclientRegistrationCallbacklookupClient()orlistClients()2. Client Registration Callback
Added
clientRegistrationCallbackoption to allow adding props to clients when they are created through the dynamic client registration endpoint.The callback receives parsed client information and can return props to be stored with the client. The callback options are derived from
ClientInfousing TypeScript utility types for type safety.Type Safety
ClientInfonow uses a generic type parameterPropsinstead ofMetadatafor consistencylookupClient,createClient,listClients,updateClient,getClient) support the genericPropstypeClientRegistrationCallbackOptionsis derived fromClientInfousingPickutility type for type safetyBreaking Changes
None
Testing
clientRegistrationCallbackcreateClient()Documentation
clientRegistrationCallback