moodio / msal-flutter

Microsoft Authentication Library Flutter Wrapper
https://pub.dev/packages/msal_flutter
MIT License
19 stars 26 forks source link

Launching MS Authenticator #13

Open bkmadhoo opened 4 years ago

bkmadhoo commented 4 years ago

PublicClientApplication.acquireToken does not launch MS Authenticator.

Info.plist already contains the following:

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>msauthv2</string>
        <string>msauthv3</string>
    </array>

Please note that authentication works. It brings up the web-based login form even if Authenticator has been installed on the device.

The device is running iOS 13.3.1. MSAL version 1.0.7 has been pulled with CocoaPods.

Is there something that I am missing?

Stayrony commented 7 months ago

Comment knownAuthorities in path - ios/Classes/MsalExtensions.swift because with knownAuthorities for iOS broken app don't open, login works only with web view (but question still actual why it doesn't work with knownAuthorities ?):

//         var knownAuthorities: [MSALAuthority] = [authority]
//
//         if dictionary["knownAuthorities"] != nil {
//             for item in dictionary["knownAuthorities"] as! [String] {
//                 do {
//                     let auth = try MSALAuthority.fromString(entry: item)!
//                     knownAuthorities.insert(auth,at:0)
//                 } catch {
//
//                 }
//             }
//         }
//
//         config.knownAuthorities = knownAuthorities