aboutsummaryrefslogtreecommitdiff
path: root/patches/react-native-inappbrowser-reborn+3.5.1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/react-native-inappbrowser-reborn+3.5.1.patch')
-rw-r--r--patches/react-native-inappbrowser-reborn+3.5.1.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/react-native-inappbrowser-reborn+3.5.1.patch b/patches/react-native-inappbrowser-reborn+3.5.1.patch
new file mode 100644
index 00000000..12a49b85
--- /dev/null
+++ b/patches/react-native-inappbrowser-reborn+3.5.1.patch
@@ -0,0 +1,24 @@
+diff --git a/node_modules/react-native-inappbrowser-reborn/ios/RNInAppBrowser.m b/node_modules/react-native-inappbrowser-reborn/ios/RNInAppBrowser.m
+index 674e8f1..81f069e 100644
+--- a/node_modules/react-native-inappbrowser-reborn/ios/RNInAppBrowser.m
++++ b/node_modules/react-native-inappbrowser-reborn/ios/RNInAppBrowser.m
+@@ -90,15 +90,17 @@ RCT_EXPORT_METHOD(openAuth:(NSString *)authURL
+ }
+ };
+
++ NSString *escapedRedirectURL = [redirectURL stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]];
++
+ if (@available(iOS 12.0, *)) {
+ webAuthSession = [[ASWebAuthenticationSession alloc]
+ initWithURL:url
+- callbackURLScheme:redirectURL
++ callbackURLScheme:escapedRedirectURL
+ completionHandler:completionHandler];
+ } else {
+ authSession = [[SFAuthenticationSession alloc]
+ initWithURL:url
+- callbackURLScheme:redirectURL
++ callbackURLScheme:escapedRedirectURL
+ completionHandler:completionHandler];
+ }
+