ASWebAuthenticationSession with callbackURLScheme prior to iOS 17.4 not working as expected

I am trying to auth with a non-apple auth provider for a multi-platform service. I'm expecting to be able to use this to fetch the OAuth code after the user logs in to their auth provider.

myRedirectHost = 'https' OR 'https://my.domain.com' where I also know the redirect path and query params and will extract them.

ASWebAuthenticationSession(url: url, callbackURLScheme: myRedirectHost, completionHandler: handleAuthSessionResult)

This works for iOS 17.4+ with that nice enum, but what about the rest of the users?

Answered by Systems Engineer in 790822022

The API for handling https-based callbacks is new in iOS 17.4 as you said, and works on that OS and newer. For users on older devices, you'll need to continue to use the custom scheme approach.

The API for handling https-based callbacks is new in iOS 17.4 as you said, and works on that OS and newer. For users on older devices, you'll need to continue to use the custom scheme approach.

ASWebAuthenticationSession with callbackURLScheme prior to iOS 17.4 not working as expected
 
 
Q