feat(core): implement fetcher for My Account and My Organization clients#163
Open
jacobovidal wants to merge 19 commits intoauth0:mainfrom
Open
feat(core): implement fetcher for My Account and My Organization clients#163jacobovidal wants to merge 19 commits intoauth0:mainfrom
jacobovidal wants to merge 19 commits intoauth0:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #163 +/- ##
==========================================
- Coverage 88.07% 87.95% -0.13%
==========================================
Files 145 145
Lines 12360 12353 -7
Branches 1633 1623 -10
==========================================
- Hits 10886 10865 -21
- Misses 1474 1488 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit 7d68a0e.
rax7389
reviewed
Mar 16, 2026
packages/core/src/auth/auth-types.ts
Outdated
| export interface BasicAuth0ContextInterface { | ||
| getConfiguration: () => Readonly<ClientConfiguration>; | ||
| mfa: MfaApiClient; | ||
| createFetcher?: CreateFetcherFunction; |
Contributor
There was a problem hiding this comment.
looks like this should be required attribute not optional?
| expect(headers.get('Authorization')).toBe('Bearer mock-access-token'); | ||
| }); | ||
| }); | ||
| }); |
Contributor
There was a problem hiding this comment.
maybe we should not remove this file and we should add test for addDeprecatedWithScopes, createProxyFetcher, createSpaFetcher
Author
There was a problem hiding this comment.
Indeed, it's better we add unit tests for those functions, although in practice it was covered in my organization and my account tests
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.
Description
Replaces the old service layer with a simplified architecture using the SDK's custom fetcher pattern, enabling DPoP token support.
The current implementation uses a service layer that wraps SDK clients and manually handles scope injection via
withScopes(). This approach doesn't support DPoP tokens (required for enhanced security) and adds unnecessary abstraction.The new implementation leverages the SDK's custom fetcher pattern:
auth0-scopeheader for the proxy to handle token requests.createFetcher()which natively supports DPoP tokens.Changes in
coreMy account example:
Breaking changes (with backward compatibility)
This PR maintains full backward compatibility with the existing
withScopes()method (deprecated but functional):All scope constants (
USER_MFA_SCOPES,MY_ORGANIZATION_DOMAIN_SCOPES, etc.) remain exported for backward compatibility.A follow-up PR to the react package will remove usage of
withScopes()and scope constants.