AzureAD / microsoft-authentication-library-for-dotnet

Microsoft Authentication Library (MSAL) for .NET
https://aka.ms/msal-net
MIT License
1.4k stars 341 forks source link

Support MacCatalyst #3527

Open SameerK-MSFT opened 2 years ago

SameerK-MSFT commented 2 years ago

Support MacCatalyst in the library

SameerK-MSFT commented 2 years ago

Support MacCatalyst in the Library

bgavrilMS commented 2 years ago

Please add BUG or Feature Request tags on work items. Also, please update the Effort number.

SameerK-MSFT commented 2 years ago

MacCatalyst does not support existing file based keychain access. To switch to Data Protection based access, it may require coordination with other teams. Started the communication. Ref

bgavrilMS commented 2 years ago

Ack, dropping this for now as it requires extensive work and collab with MSAL.ObjC team on KeyChain APIs and config.

SophisticatedConsulting commented 2 years ago

Please prioritise MacCatalyst support and MAUI support in general. MS is pushing MAUI but this does not seem to be fully aligned across MS.

bgavrilMS commented 2 years ago

CC @oldalton

pmaytak commented 2 years ago

If I remember the original issue was that a maui maccatalyst project ended up using ios MSAL target, which broke in the keychain code. Can the existing Xamarin Mac code not work for MacCatalyst target?

bgavrilMS commented 2 years ago

Root cause for not supporting MacCatalyst - https://github.com/AzureAD/microsoft-authentication-library-for-objc/issues/649

Basically we're not sure how to store the token cache so that it doesn't break future scenarios. Blocked until this is figured out by MSAL-ObjC team.

MSicc commented 1 year ago

any news on this?

bgavrilMS commented 1 year ago

We do not plan to support Mac Catalyst in the foreseeable future. Please upvote for this feature to understand interest.

bgavrilMS commented 1 year ago

@EddieLukeAtmey - this repo is for MSAL.NET. I believe your query is about MSAL ObjC (which also does not support MacCatalyst)

EddieLukeAtmey commented 1 year ago

Sorry for bothering you. I've deleted the comment and moved it to the MSAL ObjC Repo.

charlesroddie commented 1 year ago

This issue is currently tied up with a small Microsoft bureaucracy that don't seem to be aware of broader Microsoft cross platform products and strategy let alone customer needs. The objective C linked issue:

Overall the organization in charge of that repo has programmers involved but seems unable to make high level decisions. Most likely the org needs to be bypassed in some way or an appeal to some part of Microsoft that can make a decision needs to be made. It appears that the org is deliberately blocking support of mac catalyst (via the text && !TARGET_OS_MACCATALYST) as they believe that if the library cannot be used by developers who need special conditional access features for mac, it should not be used by anyone.

I think this repo should fork https://github.com/AzureAD/microsoft-authentication-library-for-objc , remove && !TARGET_OS_MACCATALYST as described in the workaround, and test. Very likely that will get MSAL working on maccatalyst in exactly the way it works on iOS.

kyurkchyan commented 1 year ago

We bumped over this issue while migrating our existing app to Maui. It's a shame that, as @charlesroddie mentioned, Microsoft is pushing a cross-platform technology, but the ecosystem is not there to support the full utilization of cross-platform capabilities.

bgavrilMS commented 10 months ago

While MSAL .NET doesn't support Mac Catalyst, app developers do have the option of using extensibility points to achieve this.

Serialize the cache to KeyChain

https://learn.microsoft.com/en-us/entra/msal/dotnet/how-to/token-cache-serialization?tabs=custom

Pop up a Web Browser

https://learn.microsoft.com/en-us/entra/identity-platform/scenario-desktop-acquire-token-interactive?tabs=dotnet#withcustomwebui

for iOS the MSAL's system browser code is here: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/main/src/client/Microsoft.Identity.Client/Platforms/iOS/SystemWebview/SystemWebUI.cs

cconner100 commented 8 months ago

So is there any examples of how this will all work on a mac catalyst system? Thanks for the pointers but an example of how to do this with AZB2C would be nice

bengavin commented 2 months ago

@bgavrilMS adding another voice in support of getting proper MacCatalyst support out of the box for MAUI. I'm uncertain why this is such a hang-up, we have data stored in the keychain via the SecureStorage libraries in .NET 8 MAUI, so that seems like a solved problem. Do we have any vision into the 'when' of getting this landed in the OOB library?