-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Enable Edge API for Platform brokering #8171
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
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 introduces support for platform broker authentication via DOM APIs in Edge browser, allowing direct communication with the platform broker without requiring a browser extension. The PR adds a new allowPlatformBrokerWithDOM configuration flag, includes validation to ensure it's only enabled when allowPlatformBroker is also enabled, and updates documentation to reflect these changes.
Key changes:
- Adds
allowPlatformBrokerWithDOMconfiguration flag with validation that prevents enabling it withoutallowPlatformBroker - Refactors
PlatformAuthProviderto accept DOM support as a parameter instead of reading from session storage, removing the deprecatedisDomEnabledForPlatformAuth()method - Updates documentation to clarify platform broker support across Windows/Mac and describes the new Edge DOM API feature
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/msal-common/src/error/ClientConfigurationErrorCodes.ts | Adds error code for invalid platform broker configuration |
| lib/msal-common/src/error/ClientConfigurationError.ts | Adds error message for the new configuration validation error |
| lib/msal-browser/test/broker/PlatformAuthProvider.spec.ts | Updates tests to pass DOM config as parameter instead of using session storage; removes deprecated tests |
| lib/msal-browser/test/app/PublicClientApplication.spec.ts | Updates test to use new allowPlatformBrokerWithDOM flag instead of session storage |
| lib/msal-browser/src/controllers/StandardController.ts | Passes allowPlatformBrokerWithDOM config to platform provider initialization |
| lib/msal-browser/src/config/Configuration.ts | Defines the new allowPlatformBrokerWithDOM configuration option with default value |
| lib/msal-browser/src/broker/nativeBroker/PlatformAuthProvider.ts | Refactors to accept DOM support as parameter, adds configuration validation, removes deprecated session storage method |
| lib/msal-browser/docs/device-bound-tokens.md | Updates documentation to clarify platform broker support and adds new section for DOM API configuration |
| change/@azure-msal-common-c8d42435-3b15-43cc-9cce-19f00d77e61e.json | Beachball changefile for msal-common package |
| change/@azure-msal-browser-bdb9bd60-08c2-4532-b0cd-2b9830ffa03f.json | Beachball changefile for msal-browser package |
lib/msal-browser/src/broker/nativeBroker/PlatformAuthProvider.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…8172) - [x] Add test coverage for configuration validation error when allowPlatformBrokerWithDOM is enabled without allowPlatformBroker - [x] Import ClientConfigurationErrorCodes in test file - [x] Verify test passes and linter passes <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sameerag <21958742+sameerag@users.noreply.github.com>
- Add allowPlatformBrokerWithDOM configuration flag - Update isPlatformBrokerAvailable to require domConfig as first parameter - Remove deprecated isDomEnabledForPlatformAuth function - Add error validation for invalid platform broker configuration - Update documentation with platform broker terminology and DOM API support Co-authored-by: sameerag <21958742+sameerag@users.noreply.github.com>
This pull request:
allowPlatformBrokerWithDOM), and introduces validation to prevent misconfiguration.