Custom Default Browser Not Receiving ASWebAuthenticationSession SSO After Launching Safari/Chrome

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:

  1. Launch & confirm that the custom default browser app is the default browser in System Settings → Default Web Browser.
  2. Trigger SSO (e.g., try to log in to Slack).
  3. App’s WKWebView appears, and the SSO UI works end-to-end.
  4. Close the WebView window (I have windowShouldClose callback where I cancel the pending session).
  5. Manually launch Safari or Chrome.
  6. Trigger SSO again. Observed behaviour: the login URL opens in Safari/Chrome.

I am using macOS 15.3.2

Custom Default Browser Not Receiving ASWebAuthenticationSession SSO After Launching Safari/Chrome
 
 
Q