My macOS app uses ASWebAuthenticationSession
for users to login to a third party service. It's worked fine until Monterey.
When I call start
on ASWebAuthenticationSession
it shows me the permission window as expected:
However when I click Continue
nothing else happens. It does not show the Safari
window and load the login page.
I've noticed these errors appear in the Console every time, so it seems it's having trouble opening Safari (even though I have Safari already open).
Any suggestions on how to fix this? Surely ASWebAuthenticationSession
isn't broken for everyone?
error 10:40:50.598301+0000 kernel 43 duplicate reports for Sandbox: com.apple.WebKit(13346) deny(1) mach-lookup com.apple.diagnosticd
error 10:40:50.598309+0000 kernel Sandbox: SafariLaunchAgen(5469) deny(1) system-fsctl _IO('h', 47)
error 10:40:52.349729+0000 kernel Sandbox: com.apple.WebKit(6675) deny(1) mach-lookup com.apple.diagnosticd
error 10:40:53.011948+0000 CoreServicesUIAgent LAUNCH: Launch failure with -10652/ <FSNode 0x60000068b6e0> { isDir = y, path = '/Applications/Safari.app' }
error 10:40:53.019505+0000 CoreServicesUIAgent Unable to forward entitlements from overridden keySenderAuditTokenAttr [sess=100005 pid=5469 uid:501,501,501 g:20,20 pV:257536] to target port ( port:85539/0x14e23 rcv:0,send:2,d:0 limit:0), which will likely cause them to reject this AppleEvent, errorRef=[ NULL ]