Hi Apple Developer Support,
I’m building a macOS app that acts as a default browser. I can confirm that I can set it correctly through System Settings → Default Web Browser. The app implements ASWebAuthenticationSessionWebBrowserSessionHandling to intercept Single Sign-On (SSO) flows. To handle requests, it presents SSO pages in a WKWebView embedded in a window that this app creates and owns - this works perfectly for the initial login flow.
However, after I close my WebView window and then launch Safari or Chrome, any subsequent SSO requests open in the newly-launched browser instead of my custom browser, even though it remains selected as the default in System Settings.
I’d appreciate any insight on why the system “hands off” to Safari/Chrome in this scenario, and how I can keep my app consistently intercepting all ASWebAuthenticationSession requests.
Here are the steps that break down the issue:
- Launch & confirm that the custom default browser app is the default browser in System Settings → Default Web Browser.
- Trigger SSO (e.g., try to log in to Slack).
- App’s WKWebView appears, and the SSO UI works end-to-end.
- Close the WebView window (I have windowShouldClose callback where I cancel the pending session).
- Manually launch Safari or Chrome.
- Trigger SSO again. Observed behaviour: the login URL opens in Safari/Chrome.
I am using macOS 15.3.2