New in iOS 17.4 is the ability to set headers on an instance of ASWebAuthenticationSession.

Like NSURLSession, simply add to the new additionalHeaderFields property.

However, this is not the only change. There is now a new initializer, initWithURL:callback:completionHandler:, which leverages the new ASWebAuthenticationSessionCallback class. This allows developers to more strictly control callback behavior by differentiating custom schemes and HTTP URL schemes.