Skip to content

Conversation

konstantin-msft
Copy link
Collaborator

  • Pass "forceRefresh" param to NAA bridge.

@Copilot Copilot AI review requested due to automatic review settings September 15, 2025 14:43
@konstantin-msft konstantin-msft requested a review from a team as a code owner September 15, 2025 14:43
Copy link
Contributor

@Copilot Copilot AI left a 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 adds support for passing the forceRefresh parameter to the NAA (Nested App Auth) bridge in MSAL.js. This ensures that when a client requests a forced token refresh, the parameter is properly forwarded to the underlying authentication bridge.

Key Changes:

  • Added forceRefresh property to the TokenRequest type
  • Updated the token acquisition logic to pass the forceRefresh parameter to NAA bridge requests
  • Added comprehensive test coverage for both when forceRefresh is provided and when it's not

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/msal-browser/src/naa/TokenRequest.ts Added optional forceRefresh boolean property to the TokenRequest interface
lib/msal-browser/src/controllers/NestedAppAuthController.ts Modified acquireTokenSilent to forward the forceRefresh parameter to the NAA bridge
lib/msal-browser/test/controllers/NestedAppAuthController.spec.ts Added test cases to verify forceRefresh parameter is properly forwarded and not set when undefined

@konstantin-msft konstantin-msft changed the title Pass "forceRefresh" param to NAA bridge [v5] Pass "forceRefresh" param to NAA bridge Sep 15, 2025
@konstantin-msft konstantin-msft enabled auto-merge (squash) September 15, 2025 21:01
@konstantin-msft konstantin-msft merged commit c5741e8 into msal-v5 Sep 16, 2025
6 checks passed
@konstantin-msft konstantin-msft deleted the pass_force_refresh_v5 branch September 16, 2025 19:31
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.

3 participants