     var entryPointUrl: URL!
     var issuerUrl: URL!
     var provider: String = ""
+
+    var completed: Bool = false
 
     var success: ((String) -> Void)?
     var failure: (() -> Void)?

        guard let url = url, isCallback(url: url) else { return false }

        DispatchQueue.main.asyncAfter(deadline: .now() + 3) { [weak self] in
            self?.success?(self?.credentialToken ?? "")
            self?.close(animated: true)
        }

        let req = URLRequest(url: url)
        webView.load(req)
    }

    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)

        if !completed {
            failure?()
        }
    }
}

extension SAMLViewController: WKNavigationDelegate {
