Repository navigation
feat(authentication): add msal browser authentication provider - #2138
RKS (rksharma-owg) wants to merge 12 commits into
Conversation
…ecycle, account propagation, and scope immutability
… register release automation
|
Updated in commit
All 16 unit tests pass locally in Node and headless Chrome. |
|
RKS (@rksharma-owg) would you mind addressing this please?
|
0ee3074
|
Addressed in The test fails when served over HTTP and also fails on HTTPS if the provider's explicit HTTP guard is removed. All 17 fork validation jobs passed, including the three Chromium jobs and MSAL coverage. Node skips the browser-only case explicitly. No library dependencies changed in this correction. |
Vincent Biret (baywet)
left a comment
There was a problem hiding this comment.
Thank you for making the changes!
|
RKS (@rksharma-owg) can you add references to this sub project + badge in the main readme please? |
41231ee
|
Added the MSAL Browser entry and npm badge to the main README in Local build, lint, integrated build, and Node tests passed. All 17 refreshed fork jobs passed, including 21 actual HTTPS Chromium tests on each Node 22/24/26 runtime. |


Resolves #186
Summary
Adds
@microsoft/kiota-authentication-msal-browser, providingMsalBrowserAuthenticationProviderandMsalBrowserAccessTokenProviderfor Kiota clients using a consumer-supplied MSAL Browser application.Review follow-up
URL normalization now matches allowed-host handling for protocol-relative and bare-host URLs. Inferred scopes use the parsed URL host, excluding query strings and fragments and normalizing hostname case. Regression tests cover those five forms. HTTPS validation and localhost behavior remain intact.
The package retains the correlation-ID correction and release-please registration. The current-main merge aligns the package and linked-release manifest to preview.110 and preserves all upstream lockfile entries, including libc metadata. No generated changelog is included.
Validation
Current head:
7898b7c11924684f3a493140c4fed7859c06d298, merged with upstream main935dda5d45f28a0f30e97a9611d8fa3fe603edf4.npm ci, build, ESLint, Prettier, integrated build, repository tests, and coverage passed.All 15 jobs that check out source verify the full tested SHA; the final matrix gate checks their results. Workflow revision:
789ca5aacd57022379e6b79a3af52407bb94b897. Skipped tests and upstream-only approvals are not counted as passed. No platform snapshots, assertions, or coverage gates were weakened.HTTPS test and CI review correction
The HTTPS correction in
0ee30741a0ba0dff5b8ec40efbd19ba66cc8cc56includes main0e84ef8f49c77aab851ba720c0e02e1cd401e2d5and its supported Node.js 22/24/26 matrix. The browser regression now asserts the actual HTTPS page protocol; it does not attempt to overridewindow.locationor ignore setup failures. The workflow runs all 21 MSAL tests in actual Chromium on each supported Node version, generates temporary localhost TLS certificates, includes MSAL distribution artifacts and coverage, and requires the browser jobs to pass in the aggregate gate. Browser-provider tooling is installed separately in the runner's temporary directory; library dependencies are unchanged by this correction.Validation: exact-head/merged-head fork run, all 17 jobs passed: three build/test jobs, ten coverage jobs, three actual Chromium jobs, and the aggregate. Node suites pass 471 tests with two skips per invocation, including the explicitly browser-only regression; Chromium executes all 21 MSAL tests with no skips. Local build, lint, formatting, integrated build, Node tests, coverage, and HTTPS Chromium passed. The regression fails on an HTTP page; removing the provider's protocol guard also makes it fail on HTTPS, and restoring the guard passes. Upstream approval and private-feed publication checks are separate from this fork validation.
README and project-reference follow-up
Head
41231ee282ae23fca80ec2595fac2e7b7e545faaadds the MSAL Browser library link and npm version badge to the main README, explicitly installs both packages used by the sample, and adds the package totsconfig.base.jsonproject references. No runtime implementation or dependencies changed in this follow-up.Local build, lint, integrated build, and Node tests passed; documentation paths, package names, and project references were checked. Refreshed exact-head cloud validation passed all 17 jobs, including the build/coverage matrix and all 21 actual HTTPS Chromium tests on each Node 22/24/26 runtime. Node suites retain the two documented skips. Upstream approval and private-feed checks remain separate.