Skip to content

feat: use form_post for default flow#325175

Merged
rzhao271 merged 5 commits into
mainfrom
rzhao271/bump-msal-flow
Jul 10, 2026
Merged

feat: use form_post for default flow#325175
rzhao271 merged 5 commits into
mainfrom
rzhao271/bump-msal-flow

Conversation

@rzhao271

@rzhao271 rzhao271 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Settings Sync auth verification: passed

Copilot AI review requested due to automatic review settings July 9, 2026 19:14
@rzhao271 rzhao271 self-assigned this Jul 9, 2026
@rzhao271 rzhao271 added this to the 1.129.0 milestone Jul 9, 2026
@rzhao271 rzhao271 requested a review from TylerLeonhardt July 9, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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' in DefaultLoopbackFlow.trigger's acquireTokenInteractive request (correctly scoped to the built-in loopback flow only; UrlHandlerFlow still reads query params and is left unchanged).
  • Update package-lock.json to @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.5 range in package.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

Comment thread extensions/microsoft-authentication/src/node/flows.ts
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
@rzhao271 rzhao271 enabled auto-merge (squash) July 9, 2026 23:04
@rzhao271 rzhao271 merged commit 90ca83f into main Jul 10, 2026
30 checks passed
@rzhao271 rzhao271 deleted the rzhao271/bump-msal-flow branch July 10, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants