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] Move authority initialization from constructor #1885

Merged
merged 5 commits into from Jul 2, 2020

Conversation

pkanher617
Copy link
Contributor

This PR updates the constructor to remove async authority creation and have it occur only on the first API call.

Comment on lines +474 to +493
/**
*
* Use to get the redirect uri configured in MSAL or null.
* Evaluates redirectUri if its a function, otherwise simply returns its value.
* @returns {string} redirect URL
*
*/
private getRedirectUri(requestRedirectUri?: string): string {
return requestRedirectUri || this.config.auth.redirectUri || BrowserUtils.getCurrentUri();
}

/**
* Use to get the post logout redirect uri configured in MSAL or null.
* Evaluates postLogoutredirectUri if its a function, otherwise simply returns its value.
*
* @returns {string} post logout redirect URL
*/
private getPostLogoutRedirectUri(requestPostLogoutRedirectUri?: string): string {
return requestPostLogoutRedirectUri || this.config.auth.postLogoutRedirectUri || BrowserUtils.getCurrentUri();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved without change

@pkanher617 pkanher617 changed the base branch from browser-pca-logger to dev July 2, 2020 23:13
@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 80.988% when pulling 49c9017 on authority-init into 95e76d4 on dev.

@pkanher617 pkanher617 merged commit e799ea5 into dev Jul 2, 2020
@pkanher617 pkanher617 deleted the authority-init 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants