feat: use form_post for default flow#325175
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches the Microsoft authentication extension's default interactive sign-in flow to use the OAuth 2.0 form_post response mode, so the authorization code is delivered in a POST body rather than the redirect URL's query string. To make this possible, it bumps @azure/msal-node (and its transitive msal-common / msal-node-extensions) to versions that added built-in loopback-client support for form_post (msal-node 5.4.0, via upstream MSAL PR #8694). Delivering the code in a POST body avoids exposing it in the browser URL, improving the security posture of the local sign-in flow.
Changes:
- Pass
responseMode: 'form_post'inDefaultLoopbackFlow.trigger'sacquireTokenInteractiverequest (correctly scoped to the built-in loopback flow only;UrlHandlerFlowstill reads query params and is left unchanged). - Update
package-lock.jsonto@azure/msal-node@5.4.0,@azure/msal-node-extensions@5.3.2, and@azure/msal-common@16.11.1, all satisfying the existing^5.1.5range inpackage.json.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| extensions/microsoft-authentication/src/node/flows.ts | Adds responseMode: 'form_post' to the default loopback interactive auth request. |
| extensions/microsoft-authentication/package-lock.json | Bumps MSAL dependencies to versions providing form_post loopback support. |
Files not reviewed (1)
- extensions/microsoft-authentication/package-lock.json: Generated file
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
TylerLeonhardt
approved these changes
Jul 9, 2026
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.
Settings Sync auth verification: passed