mirror of
https://github.com/status-im/react-native-webview.git
synced 2025-02-22 08:48:39 +00:00
fix(WKWebView): Add "Frame load interrupted" error handling for OAuth (#147)
This commit is contained in:
parent
c9a777bdfb
commit
6f612242fe
@ -466,6 +466,13 @@ static NSString *const MessageHanderName = @"ReactNative";
|
||||
return;
|
||||
}
|
||||
|
||||
if ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102) {
|
||||
// Error code 102 "Frame load interrupted" is raised by the WKWebView
|
||||
// when the URL is from an http redirect. This is a common pattern when
|
||||
// implementing OAuth with a WebView.
|
||||
return;
|
||||
}
|
||||
|
||||
NSMutableDictionary<NSString *, id> *event = [self baseEvent];
|
||||
[event addEntriesFromDictionary:@{
|
||||
@"didFailProvisionalNavigation": @YES,
|
||||
|
Loading…
x
Reference in New Issue
Block a user