Closed shweaver-MSFT closed 3 years ago
Thanks shweaver-MSFT for opening a Pull Request! The reviewers will test the PR and highlight if there is any merge conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌
Fixes #168 Fixes #170
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently the MsalProvider does not invoke the native account broker in Windows, even when it is available. Users always see the web-based prompt, even when using the MsalProvider in UWP.
What is the new behavior?
I've made a few changes:
CommunityToolkit.Authentication.Msal
package to multi-targetuap10.0
,netstandard3.1
, andnet5.0-windows10.0.17763.0
as well as the existing target fornetstandard2.0
. This enables the Windows account broker to work for those additional frameworks.MsalProvider
to use the appropriate APIs depending on where the app is running (UWP/Net5-Windows or otherwise).PublicClientApplication
object.PR Checklist
Please check if your PR fulfills the following requirements:
Other information
A good way to test is by firing up the UwpMsalProviderSample, WpfNet5WindowsMsalProviderSample, and WpfNetCoreMsalProviderSample samples and compare the experience.
More info on the cache situation can be found here: https://github.com/AzureAD/microsoft-authentication-extensions-for-dotnet/wiki/Cross-platform-Token-Cache