mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
fix(WKWebView): Add "Frame load interrupted" error handling for OAuth (#147)
This commit is contained in:
committed by
Thibault Malbranche
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,
|
||||
|
||||
Reference in New Issue
Block a user