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

msal-browser uses AuthCodeClient and SilentFlowClient #1793

Merged
merged 20 commits into from Jun 24, 2020

Conversation

pkanher617
Copy link
Contributor

This PR removes the SPAClient.ts file and changes the PublicClientApplication class in msal-browser to

  • Create a client on every API call
  • Generate authority dynamically
  • Instead of using SPAClient, we now use the AuthorizationCodeClient and SilentFlowClient classes

This PR also does the following:

  • a request object for logout APIs (Currently only used by the browser)
  • some cleanup code
  • remove redirectUri from the ClientConfiguration and add it to all request objects
  • refactor AuthorizationCodeModule to fit for SPA use cases

@github-actions github-actions bot added msal-browser Related to msal-browser package msal-common Related to msal-common package samples Related to the samples apps for the library. labels Jun 17, 2020
Copy link
Contributor

@jasonnutter jasonnutter left a comment

Choose a reason for hiding this comment

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

A few comments. I would like to see PRs like this broken up, given there are changes that are unrelated or could be done incrementally.

lib/msal-browser/src/app/PublicClientApplication.ts Outdated Show resolved Hide resolved
lib/msal-browser/src/app/PublicClientApplication.ts Outdated Show resolved Hide resolved
@github-actions github-actions bot added the msal-node Related to msal-node package label Jun 19, 2020
@sangonzal
Copy link
Contributor

Looks good.

Only open question is about sending redirect URI as part of refresh token request. We should ensure that:

  • Indeed it's necessary
  • Including it as part of Node requests does not change or break behavior

Copy link
Collaborator

@tnorling tnorling left a comment

Choose a reason for hiding this comment

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

Left a few comments + tests

@pkanher617 pkanher617 changed the base branch from msal-2-state-changes to dev June 23, 2020 21:29
@coveralls
Copy link

coveralls commented Jun 23, 2020

Coverage Status

Coverage increased (+1.3%) to 78.944% when pulling 810202f on msal-common-client-merge into 20fca14 on dev.

@pkanher617 pkanher617 merged commit f7fa435 into dev Jun 24, 2020
@pkanher617 pkanher617 deleted the msal-common-client-merge branch October 2, 2020 18:06
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 msal-common Related to msal-common package msal-node Related to msal-node package samples Related to the samples apps for the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants