You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
Allow usage of WKWebView with authorization code flow.
When setting the switch WebViewConfiguration.IOS.IsUsingWKWebView = true, the redirect url once hit just stays on the screen and does nothing.
WKWebViewNavigationDelegate seems to only support access tokens via the redirect url and doesnt do the same logic as UIWebView does
public override void DecidePolicy(
WKWebView webView,
WKNavigationAction navigationAction,
Action<WKNavigationActionPolicy> decisionHandler)
{
Uri uri = new Uri(webView.Url.AbsoluteString);
string fragment = uri.Fragment;
if (fragment.Contains("access_token") || fragment.Contains("state") || (fragment.Contains("expires_in") || fragment.Contains("error")))
this.controller.authenticator.OnSucceeded(new Account("", (IDictionary<string, string>) new Dictionary<string, string>(WebEx.FormDecode(uri.Fragment))));
else if (fragment.Contains("code"))
throw new NotImplementedException("code - Explicit/Server");
decisionHandler(WKNavigationActionPolicy.Allow);
}
It should call into this.controller.authenticator.OnPageLoaded(url); and eventually RequestAccessTokenAsync the same as the UIWebView does and not just do nothing like it currently does.
The text was updated successfully, but these errors were encountered:
Allow usage of
WKWebView
with authorization code flow.When setting the switch
WebViewConfiguration.IOS.IsUsingWKWebView = true
, the redirect url once hit just stays on the screen and does nothing.WKWebViewNavigationDelegate seems to only support access tokens via the redirect url and doesnt do the same logic as UIWebView does
It should call into
this.controller.authenticator.OnPageLoaded(url);
and eventuallyRequestAccessTokenAsync
the same as the UIWebView does and not just do nothing like it currently does.The text was updated successfully, but these errors were encountered: