[SDK-2757] Improve support for custom domain configurations #554
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
A community GitHub issue was reported (#538) in which Management SDK calls don't work with custom domains "out of the box." After some testing, I confirmed our current handling of the single-use
domain
configuration option in both the stable and upcoming release of the PHP are not adequate to cover the needs of custom domain users.In particular, without providing a means of specifying both the tenant domain and a custom domain, Management SDK calls will be broken unless the customer writes custom code exchange boilerplate because of the reasons outlined here: https://auth0.com/docs/brand-and-customize/custom-domains#step-3-complete-feature-specific-setup
This PR adds a new configuration option,
customDomain
. When this is configured, the SDK will automatically adapt API calls and Token verifications to ensure the appropriate domains are used at the appropriate times. This fixes out-of-the-box Management SDK calls and provides a clearer API by explicitly separating the definitions of tenant domain and custom domain during configuration.References
Resolves #538
Testing
composer run tests
orcomposer run tests:docker
to run these tests locally, or review the CircleCI tests ran on this PR.Contributor Checklist