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

WebAuthenticationBroker from ViewModel? #1782

Closed
weitzhandler opened this issue Aug 22, 2020 · 3 comments
Closed

WebAuthenticationBroker from ViewModel? #1782

weitzhandler opened this issue Aug 22, 2020 · 3 comments
Assignees
Labels
Pri2 Topic is in the second 25% of page views for the repo. product-question Not topic feedback. Direct customer to product feedback process. uwp/prod Topic product is UWP-related. winrt-reference/tech Topic technology is WinRT-related.

Comments

@weitzhandler
Copy link
Contributor

Hi,

I wonder if there is any documentation on how to handle authentication identity, token, claims, and user, from when the UI logic is decoupled into a ViewModel etc. layer that's UI-agnostic.

Related: microsoft/WindowsAppSDK#31


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@PRMerger16 PRMerger16 added Pri2 Topic is in the second 25% of page views for the repo. uwp/prod Topic product is UWP-related. winrt-reference/tech Topic technology is WinRT-related. labels Aug 22, 2020
@hkhmsft hkhmsft added the product-question Not topic feedback. Direct customer to product feedback process. label Aug 23, 2020
@bgavrilMS
Copy link

@weitzhandler - I'm providing a few ideas based on my experience as the MSAL.NET developer. MSAL.NET integrates with WAB.

WAB is deprecated and as far as I know there is no new feature work happening there. I have not investigated if there are win32 projections of the WAB API.

I would suggest instead you look at WAM, which provides much better support especially around device authentication, integration with Windows Hello etc. There are win32 projections of the WAM API. From my experience with integrating with WAM (currently in progress), the difference between UWP and Win32 is:

  • on Win32, you are required to parent the Authentication controls to the a window handle
  • on UWP, this is not required, because you can always get the current view
  • on both, some of Authentication popups require you to be on an UI thread

@weitzhandler
Copy link
Contributor Author

Thanks @bgavrilMS for your kind and detailed reply,

MSAL.NET

MSAL doesn't cover custom identity management or legacy authentication with username & password against a private authentication provider (AzureAD/microsoft-authentication-library-for-dotnet#1538).

I would suggest instead you look at WAM

Sorry I mixed between WAB and WAM.

Anyway, as I commented here, I wish there was a lower level agnostic abstraction of client-side authentication flow and token management that can be managed in the ViewModel side as well.
Currently it all has to be hand-written down, hence my request for an example for using this with a real life example involving MVVM and UI decoupling.

@hkhmsft
Copy link
Contributor

hkhmsft commented Nov 4, 2021

If any new actionable items arise, let us know either through a new Issue or directly on this thread. In the meantime, I'll be closing this Issue. Thanks once again for submitting your feedback!

@hkhmsft hkhmsft closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pri2 Topic is in the second 25% of page views for the repo. product-question Not topic feedback. Direct customer to product feedback process. uwp/prod Topic product is UWP-related. winrt-reference/tech Topic technology is WinRT-related.
Projects
None yet
Development

No branches or pull requests

4 participants