-
Notifications
You must be signed in to change notification settings - Fork 39
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
Update MsalProvider to use native account broker #169
Conversation
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 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - the UWP experience is much more natural than the WPF one :(
CommunityToolkit.Authentication/Extensions/HttpRequestMessageExtensions.cs
Outdated
Show resolved
Hide resolved
… added WpfNetCoreMsalProviderSample
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