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

fix: Add msal fix for MSALClientException #2631

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eriklimakc
Copy link
Contributor

GitHub Issue (If applicable): closes #

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template. (for bug fixes / features)
  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Wasm UI Tests are not showing unexpected any differences. Validate PR Screenshots Compare Test Run results.
  • Contains NO breaking changes
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Other information

Internal Issue (If applicable):

@unodevops
Copy link

⚠️⚠️ The build 149539 has failed on uno.extensions.

@VincentH-Net
Copy link

VincentH-Net commented Dec 13, 2024

@eriklimakc does this PR enable the native Windows WAM or just the embedded browser?
The native WAM is what is recommended on Windows and the desired UX.

You can see this native UX here.
This pr adds the Microsoft.Identity.Client.Desktop NuGet, however this is not recommended as indicated on that page here.
MS recommends to use the Microsoft.Identity.Client.Broker NuGet instead:

image

In #2443 I pointed to a PR for MAUI that contains 2 key changes to re-enable the native WAM for Windows:

  1. Add .WithWindowsEmbeddedBrowserSupport()

    This is included in this fix

  2. Add .WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows))

    (also note the line below: .WithParentActivityOrWindow(() => PlatformConfig.Instance.ParentWindow) // This is required when using the WAM)

    This is not included in the changes for MsalAuthenticationProvider.cs - and it seems to be the critical adjustment for the fix

Any reason 2) is not included?

@eriklimakc eriklimakc force-pushed the dev/erli/2443-fix-msal-windows branch 2 times, most recently from dda317f to 04fa220 Compare December 24, 2024 12:13
@eriklimakc eriklimakc force-pushed the dev/erli/2443-fix-msal-windows branch from 04fa220 to 688c0c0 Compare December 24, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants