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 v2 to v3 migration | confusion about the initialization #7177

Closed
zombaki opened this issue Jun 26, 2024 · 1 comment
Closed

MSAL v2 to v3 migration | confusion about the initialization #7177

zombaki opened this issue Jun 26, 2024 · 1 comment
Labels
documentation Related to documentation. msal-angular Related to @azure/msal-angular package msal-node Related to msal-node package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@zombaki
Copy link

zombaki commented Jun 26, 2024

Core Library

MSAL Node (@azure/msal-node)

Wrapper Library

MSAL Angular (@azure/msal-angular)

Public or Confidential Client?

Public

Documentation Location

https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular16-sample-app/src/app/app.module.ts#L25

Description

In the documentation for migrating to version 2, we are instructed to create an instance of MSAL with two options:
https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v2-migration.md#application-instantiation

However, in the MSAL Angular version 3 sample, this step is not performed:
https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular16-sample-app/src/app/app.module.ts#L25

This discrepancy has led to confusion regarding whether the sample code is an accurate reference.

@zombaki zombaki added documentation Related to documentation. question Customer is asking for a clarification, use case or information. labels Jun 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Jun 26, 2024
@github-actions github-actions bot added msal-angular Related to @azure/msal-angular package msal-node Related to msal-node package public-client Issues regarding PublicClientApplications labels Jun 26, 2024
@jo-arroyo
Copy link
Collaborator

@zombaki The Angular 16 sample application creates a new instance of PublicClientApplication in the app.module.ts, as you linked above. For MSAL Angular v3, initialize is called in handleRedirectObservable in MsalService. As the sample application bootstraps the MsalRedirectComponent which subscribes to handleRedirectObservable, initialize is called when the application is run.

See the MSAL Angular upgrade guide for more details.

Closing with comment.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation. msal-angular Related to @azure/msal-angular package msal-node Related to msal-node package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

2 participants