Skip to content
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

onRedirectNavigate deprecation fix #7251

Merged
merged 10 commits into from
Aug 13, 2024
Merged

onRedirectNavigate deprecation fix #7251

merged 10 commits into from
Aug 13, 2024

Conversation

jo-arroyo
Copy link
Collaborator

@jo-arroyo jo-arroyo commented Aug 13, 2024

This PR has two fixes:

  1. Deprecating onRedirectNavigate on RedirectRequest requires additional changes on StandardController to ensure telemetry measurements are also being taken when onRedirectNavigate is set on the configuration. Tests are added in PublicClientApplication.
  2. Temporary redirect request cache must also be cleared in the event of a back button being clicked during the redirect flow. Assertion added to existing test in RedirectClient.

@github-actions github-actions bot added the msal-browser Related to msal-browser package label Aug 13, 2024
@jo-arroyo jo-arroyo marked this pull request as ready for review August 13, 2024 14:36
Copy link
Member

@sameerag sameerag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Do we have a deprecation notice added that can be emitted on user end?

@jo-arroyo
Copy link
Collaborator Author

Approved. Do we have a deprecation notice added that can be emitted on user end?

This is marked as deprecated in the RedirectRequest and if users do set onRedirectNavigate on the RedirectRequest they will get a warning about the field being deprecated and the request not being cached. Let me know if you think we need something further.

@github-actions github-actions bot added the samples Related to the samples apps for the library. label Aug 13, 2024
@github-actions github-actions bot removed the samples Related to the samples apps for the library. label Aug 13, 2024
@@ -2740,7 +2747,7 @@ describe("RedirectClient", () => {
await redirectClient.acquireToken(emptyRequest);
} catch (e) {
// Test that error was cached for telemetry purposes and then thrown
expect(window.sessionStorage).toHaveLength(2);
expect(window.sessionStorage).toHaveLength(1);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and line 3335 below) are reverting a change that was wrongly made in the redirect retry PR.

@jo-arroyo jo-arroyo merged commit 8ad6d1d into dev Aug 13, 2024
4 of 8 checks passed
@jo-arroyo jo-arroyo deleted the retry-redirect-fix branch August 13, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-browser Related to msal-browser package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants