nayanAubie / msal_auth

A new Flutter plugin for Azure AD authentication.
MIT License
8 stars 10 forks source link

Azure AD B2C tenants are not supported on iOS #9

Closed stevedayuk closed 4 months ago

stevedayuk commented 5 months ago

I'm trying to use your library to connect to an Azure AD B2C tenant which works fantastically on Android but does not work on iOS.

I've done some research and this is because the iOS SDK requires the use of the MSALB2CAuthority method rather than the standard MSALAuthority. Also the returned MSALB2CAuthority needs to be set as a known authority on the application config object. Details can be found at https://learn.microsoft.com/en-us/entra/msal/objc/configure-authority#b2c

Would it be possible for you to an additional enum to the IosConfig class to set whether the Tenant is an AD or AD B2C tenant and then use this in the Swift code to support both kinds of login? Alternatively, if you're happy to take pull requests, I have already tested these modifications against your code locally so I'd be happy to make this change and submit it for your approval.

Thanks for your great work with this library!

nayanAubie commented 5 months ago

Hello @stevedayuk Please create a PR for that if you've tested it properly in iOS and Android, I am happy to review and merge it. thanks for using this plugin.