Update Auth0 Version to V5 use Legacy (Do Not Merge) #1177
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
This pull request upgrades the
auth0dependency to version 5.0.0 and updates the codebase to use theauth0/legacyimport path for all Auth0-related clients and types.This approach allows us to adopt the new Auth0 SDK while avoiding breaking changes and maintaining compatibility with existing usage patterns.
The
auth0/legacyentry point provides backward-compatible exports for the previous v4 client interfaces, enabling a smooth, incremental migration path while we progressively adopt the newer SDK structure.Dependency and import path updates
Upgraded the
auth0dependency from v4.32.0 → v5.0.0 inpackage.json.Updated all Auth0-related imports (e.g.
ManagementClient,AuthenticationClient,Client,ResourceServer, etc.) to use theauth0/legacyimport path instead of the rootauth0package.This ensures full backward compatibility while allowing partial adoption of v5 features.
Updated references in affected modules such as:
src/contextsrc/tools/auth0/handlersESLint configuration update
"import/core-modules": ["auth0/legacy"]under ESLintsettingsto treat the new import path as a recognized core module, preventing false-positive lint errors.Template string formatting improvements
Simplified template string formatting for warning messages in:
src/context/index.tssrc/tools/auth0/handlers/default.tsRemoved unnecessary line breaks and expressions for improved readability.
📚 References
🔬 Testing
📝 Checklist
auth0/legacyimport path (or N/A)