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

Authorization Code Flow for Single Page Applications: Implementation of the Fetch Client in the Browser #1144

Merged

Conversation

pkanher617
Copy link
Contributor

This PR implements the fetch client for asynchronous network requests in the browser library for MSAL.js. This network client will be used for endpoint discovery and code-token exchange.

Please review PR #1140 before this PR.

@pkanher617 pkanher617 self-assigned this Dec 5, 2019
@pkanher617 pkanher617 changed the title Implementing fetch client, intializing the browser storage class Authorization Code Flow for Single Page Applications: Implementation of the Fetch Client in the Browser Dec 5, 2019
lib/msal-browser/src/network/FetchClient.ts Outdated Show resolved Hide resolved
lib/msal-browser/src/network/FetchClient.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@jmckennon jmckennon left a comment

Choose a reason for hiding this comment

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

LGTM besides making the actual network calls more specific (per your reminder comment)

lib/msal-browser/src/network/XhrClient.ts Outdated Show resolved Hide resolved
lib/msal-browser/src/network/XhrClient.ts Outdated Show resolved Hide resolved
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.

lgtm. Address any more comments and close.

* @param headers
* @param body
*/
async sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥 🔥 🔥 🚀

}

async sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<T> {
return this.sendRequestAsync(url, "POST", options);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the enum here also?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in PR #1149.

@pkanher617 pkanher617 changed the base branch from authorization-code-flow-browser-crypto to authorization-code-flow-base December 12, 2019 19:59
@pkanher617 pkanher617 merged commit 6a87c5f into authorization-code-flow-base Dec 12, 2019
@pkanher617 pkanher617 deleted the authorization-code-flow-browser-fetch branch December 12, 2019 20:10
azure-pipelines bot pushed a commit to pkanher617/microsoft-authentication-library-for-js that referenced this pull request Jan 4, 2022
…browser-fetch

Authorization Code Flow for Single Page Applications: Implementation of the Fetch Client in the Browser
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.

None yet

4 participants