blob: 12a49b851aeb3dac126610b9188ade0ea2102267 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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];
}
|