However, I have to call the download function from ASWebAuthenticationSession.CompletionHandler, which does not allow
to call async functions.
I don’t think this is different from any other context when you need to start async work in a context that’s not async. If so, the standard approach is to create a new top-level task:
I think Apple just forgot to provide the async APIs as well. For example, there are new beta async API for WKNavigationDelegate, like this webView(_:decidePolicyFor:decisionHandler:)