diff --git a/App/ViewController.swift b/App/ViewController.swift index 29966c8b..9a7e6b30 100644 --- a/App/ViewController.swift +++ b/App/ViewController.swift @@ -27,7 +27,6 @@ class ViewController: UIViewController { @IBAction func login(_ sender: Any) { Auth0 .webAuth() - .provider(WebAuthentication.webViewProvider()) .logging(enabled: true) .start(onAuth) } @@ -35,7 +34,6 @@ class ViewController: UIViewController { @IBAction func logout(_ sender: Any) { Auth0 .webAuth() - .provider(WebAuthentication.webViewProvider()) .logging(enabled: true) .clearSession(federated: false) { result in switch result { diff --git a/Auth0/WebViewProvider.swift b/Auth0/WebViewProvider.swift index c9a929af..c8e52391 100644 --- a/Auth0/WebViewProvider.swift +++ b/Auth0/WebViewProvider.swift @@ -11,6 +11,8 @@ @preconcurrency import WebKit +/// WARNING: The use of `webViewProvider` is not recommended and contravenes the guidelines of the OAuth Protocol, which advises against using `WKWebView` for WebAuth. +/// The recommended approach is to utilize `ASWebAuthenticationSession`. Employ the provider below only if you fully understand the associated risks and are confident in your decision. public extension WebAuthentication { static func webViewProvider(style: UIModalPresentationStyle = .fullScreen) -> WebAuthProvider { return { url, callback in