-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Identity] MSAL Cleanup #36731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Identity] MSAL Cleanup #36731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR performs a cleanup of MSAL-related code in the Identity library, focusing on three main areas: consolidating authority host handling, migrating from deprecated isNode to isNodeLike, and simplifying MsalClientOptions to eliminate nested property duplication.
- Extracted
getAuthorityHostto a dedicated utility file and removed duplicate implementations - Replaced deprecated
isNodewithisNodeLikethroughout the codebase for better environment detection - Refactored
MsalClientOptionsto extendCommonClientOptionsdirectly, removing the redundanttokenCredentialOptionsnested property
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/identity/identity/src/util/authorityHost.ts | New utility file containing the consolidated getAuthorityHost function, replacing previous duplicate implementations |
| sdk/identity/identity/src/msal/utils.ts | Removed getAuthorityHost function (moved to dedicated file) and replaced isNode with isNodeLike |
| sdk/identity/identity/src/msal/nodeFlows/msalClient.ts | Refactored MsalClientOptions interface to extend CommonClientOptions, added proper type definitions for loggingOptions, and updated to use new getAuthorityHost location |
| sdk/identity/identity/src/client/identityClient.ts | Removed duplicate getIdentityClientAuthorityHost function and updated to use consolidated getAuthorityHost from new location |
| sdk/identity/identity/src/credentials/*.ts | Removed redundant tokenCredentialOptions property from createMsalClient calls across all credential files (7 files total) and added type-only imports where appropriate |
| sdk/identity/identity/test/internal/node/*.spec.ts | Updated test files to use isNodeLike instead of isNode and updated function references to use new getAuthorityHost location |
| sdk/identity/identity/CHANGELOG.md | Added entry documenting the refactoring changes |
Closes #36199