In SFSafariViewControllerDelegate , you only have one method that can help:
optional public func safariViewController(controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool)
But it will be called only on the initial (first) url file. If you redirect and wait for some url in auth mode, this will not help. Then you should use UIWebView and implement the UIWebViewDelegate delegation method:
optional public func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: UIWebViewNavigationType) -> Bool
But don't forget to be ATS
source share