Not able to start authentication by using ASWebAuthenticationSession in Big Sur Beta 9

This seems to be a regression and it works fine in early beta versions.

When start a ASWebAuthenticationSession by setting prefersEphemeralWebBrowserSession to false (default), there will be a popover asking "AppName" want to use "certainurl.com" to sign in. When tapping the continue button from popover, a safari window will show and user can put username and password to continue authentication.

However in beta 9, when user clicks the continue button, the popover will dismiss and send error back into the completion block which was passed in when init the ASWebAuthenticationSession. The error code is ASWebAuthenticationSessionErrorCodeCanceledLogin, which should only happen when user clicks cancel instead of continue button.

Here is a public project if you want to give a try:

https://github.com/Azure-Samples/ms-identity-macOS-swift-objc
Answered by kasong1990 in 642978022
This was fixed in the latest beta 10
When trying this is Big Sur Beta 9 I am seeing the following after hitting "continue," in the popup:
Code Block
Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=1 "(null)"

I would recommend opening a Bug Report on this and following up with the Feedback ID.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Thank you for opening a Feedback (FB8778242). I see it internally and have request access to the bug report for further updates. Note: my previous test results above were a result of testing AuthenticationServices from the code example found here, I did not test your code repository.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Thanks for your replying, the sample I provided is owned by us. Our team works on the MSAL SDK, and the authentication flow happens within it.

The issue was originally reported by couple 3rd party developers who are using our SDK. Since it is a major flow which is used by lots of users, it is good to confirm if this behavior is expected or a bug from Big Sur beta 9.

Accepted Answer
This was fixed in the latest beta 10
Thank you for the update. Please respond back on your Feedback with this information as I see that your bug report internally is still assigned to the Authentication Services team.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Not able to start authentication by using ASWebAuthenticationSession in Big Sur Beta 9
 
 
Q