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

Add first order broker parameters #7348

Merged
merged 20 commits into from
Oct 16, 2024
Merged

Conversation

konstantin-msft
Copy link
Collaborator

@konstantin-msft konstantin-msft commented Sep 27, 2024

  • Add first order embedded client id parameter.
  • Instrument embedded client id and embedded redirect uri.
  • Default redirect uri to the current page in auth config.

@github-actions github-actions bot added msal-browser Related to msal-browser package msal-common Related to msal-common package documentation Related to documentation. labels Sep 27, 2024
@konstantin-msft konstantin-msft force-pushed the instrument_broker_params branch 3 times, most recently from 14cec29 to feb1025 Compare October 1, 2024 11:50
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.

Thanks for the changes. Approved.

lib/msal-browser/src/naa/mapping/NestedAppAuthAdapter.ts Outdated Show resolved Hide resolved
@@ -274,6 +275,7 @@ function buildAuthOptions(authOptions: AuthOptions): Required<AuthOptions> {
azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
skipAuthorityMetadataCache: false,
instanceAware: false,
redirectUri: "https://localhost",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should not be using or defaulting to localhost here - suggest making redirectUri required on the AuthOptions object to avoid

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Made redirectUri mandatory in msal-common and update msal-browser and msal-node accordingly.

@konstantin-msft konstantin-msft force-pushed the instrument_broker_params branch 2 times, most recently from b3e38fa to db921b7 Compare October 15, 2024 17:39
// generate the correlationId if not set by the user and add
const correlationId =
request.correlationId ||
this.config.cryptoInterface.createNewGuid();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is correlationId not a required param on request? CorrelationId should have long been generated by the time we reach this point.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should be a required param as CommonAuthorizationUrlRequest extends BaseAuthRequest. I moved this piece from here. Not sure if this.config.cryptoInterface.createNewGuid() was added on purpose or just copy-pasted.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. This is likely leftover from a time when correlationId was still optional. This would be a good opportunity to clean it up if we're moving it.

@konstantin-msft konstantin-msft merged commit 09066cc into dev Oct 16, 2024
8 checks passed
@konstantin-msft konstantin-msft deleted the instrument_broker_params branch October 16, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation. msal-browser Related to msal-browser package msal-common Related to msal-common package msal-node Related to msal-node package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants