feat: MCD (Multiple Custom Domains) Support#2545
Open
tusharpandey13 wants to merge 15 commits intomainfrom
Open
feat: MCD (Multiple Custom Domains) Support#2545tusharpandey13 wants to merge 15 commits intomainfrom
tusharpandey13 wants to merge 15 commits intomainfrom
Conversation
…n (using dynamic app base url)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2545 +/- ##
==========================================
- Coverage 90.50% 89.40% -1.10%
==========================================
Files 52 59 +7
Lines 6632 7331 +699
Branches 1380 1527 +147
==========================================
+ Hits 6002 6554 +552
- Misses 619 765 +146
- Partials 11 12 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…d errors; add docs for defensive use-cases involving app-base-url; lint
Contributor
Author
Review guideChanges can be categorized as: New MCD logicThese changes add the MCD capability to the SDK, including the new AuthClient factory, caches, types and errors.
Core integrationThese changes plug MCD into existing logic
Updates to existing test filesTests for: Docs
|
…pv6 validation src/server/auth-client-provider.ts: Added MAX_PROXY_FETCHERS=100 constant + LRU eviction in getProxyFetcher() EXAMPLES.md: Updated session domain isolation docs: clarified fail-open backfill behavior for pre-MCD sessions src/errors/mcd.ts: Removed "This is an internal error" text from McdBackchannelLogoutError JSDoc (tag was already @public) src/utils/normalize.ts: Added explicit IPv6 regex check before colon/port check — now throws "IPv6 addresses are not supported" instead of confusing "cannot contain ports" src/utils/normalize.test.ts: Updated 3 IPv6 test expectations to match new error message src/server/mcd.unit.test.ts: Removed local createSessionData/createMCDMetadata redefinitions; imported from shared mcd-test-fixtures.ts src/server/mcd.unit.test.ts: Replaced 10 unnecessary as any casts with proper typed access src/utils/pathUtils.ts: createRouteUrl() now throws InvalidConfigurationError instead of generic Error EXAMPLES.md: Added SessionDomainMismatchError and McdBackchannelLogoutError to error handling table with import example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change adds support for Multiple Custom Domains using a dynamic
DomainResolverin client configuration.Changes
Note
Take a look at the Review Guide section for an easy review experience.
Auth0ClientOptions.domainwidened tostring | DomainResolverwhereDomainResolveris a callback that returns a domain string.AuthClientProviderreplaces singletonAuthClientwith shared discovery/JWKS caches,AuthClientmade domain-aware.openidscope enforced in resolver mode forissclaim availability.Usage
Full docs: EXAMPLES.md — Multiple Custom Domains
Tests
277 new tests (flow tests and UTs) across 7 files covering:
References