Added field domainMetadata for custom domain endpoints #1109
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.
Changes
Added changed in below endpoints -
/custom-domains
/custom-domains
/custom-domains/{id}
/custom-domains/{id}
/custom-domains/{id}
/custom-domains/{id}/verify
Introduced CustomDomainHeader function:
Added helper functions:
Management API Updates
Removed compatible option for TLS policies, leaving only the recommended option, which includes TLS 1.2. Updated comments to reflect this change.
Added support for domain_metadata on these interfaces PatchCustomDomainsByIdRequest, PostCustomDomainsRequest, PostCustomDomains201Response, PostVerify200Response
verification_method will be deprecated soon
Updated interface GetCustomDomainsRequest:
Added optional filters:
Updates to management-client-options.ts:
Custom Headers:
Added an optional headers property to the ManagementClientOptions interface. This allows users to specify custom headers as a Record<string, string>.
References
Please include relevant links supporting this change such as a:
Manual testing
Securely store your Client ID, Client Secret, and Management API token.
Install the SDK: npm install auth0
You can configure the SDK to send an auth0-custom-domain header. This is useful in scenarios where Auth0 needs to know the original custom domain a request was intended for, especially for certain email templates or universal login flows.
This option sets a custom domain header globally for all requests made by a management client instance. The header is only applied if the request path is whitelisted (e.g., /api/v2/users, /api/v2/jobs/verification-email).
This option sets or overrides the auth0-custom-domain header for a specific API request. It takes precedence over any globally set header and applies regardless of whether the endpoint is whitelisted for the global option.
Testing
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Checklist