cozy-client 27.3.1 → 27.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [27.3.2](https://github.com/cozy/cozy-client/compare/v27.3.1...v27.3.2) (2021-11-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Login on RN iOS ([4b85b47](https://github.com/cozy/cozy-client/commit/4b85b475bf0c5b32f94a06e524fa7f0f5011f90e))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [27.3.1](https://github.com/cozy/cozy-client/compare/v27.3.0...v27.3.1) (2021-11-16)
7
18
 
8
19
 
@@ -2415,7 +2415,7 @@ var CozyClient = /*#__PURE__*/function () {
2415
2415
  CozyClient.hooks = CozyClient.hooks || {};
2416
2416
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2417
2417
 
2418
- CozyClient.version = "27.3.1";
2418
+ CozyClient.version = "27.3.2";
2419
2419
 
2420
2420
  _microee.default.mixin(CozyClient);
2421
2421
 
@@ -64,11 +64,26 @@ var authenticateWithReactNativeInAppBrowser = /*#__PURE__*/function () {
64
64
 
65
65
  var linkListener = function linkListener(_ref2) {
66
66
  var url = _ref2.url;
67
+ var sanitizedUrl = url;
67
68
  var accessCode = /\?access_code=(.+)$/.test(url);
68
69
  var state = /\?state=(.+)$/.test(url);
69
70
 
70
71
  if (accessCode || state) {
71
- resolve(url);
72
+ if (_reactNative.Platform.OS === 'ios') {
73
+ // On iOS, the # added to the URL by the stack for security
74
+ // reason is encoded to %23. Because of this, URL().searchParams
75
+ // is not working as expected since %23 is added to the param
76
+ // instead of being ignored and assigned to the hash.
77
+ // Let's convert back %23 to # manually.
78
+ // I think the issue is related to Linking component but didn't
79
+ // find any issues on github about it. Need to make a simple
80
+ // reproduction case to create the issue.
81
+ if (url.endsWith('%23')) {
82
+ sanitizedUrl = url.replace(/%23$/, '#');
83
+ }
84
+ }
85
+
86
+ resolve(sanitizedUrl);
72
87
  removeListener();
73
88
 
74
89
  _reactNativeInappbrowserReborn.InAppBrowser.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "27.3.1",
3
+ "version": "27.3.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -69,5 +69,5 @@
69
69
  "react-native-inappbrowser-reborn": "^3.5.1"
70
70
  },
71
71
  "sideEffects": false,
72
- "gitHead": "ebc38a62e769101b304301dcdd654925925dbab3"
72
+ "gitHead": "826f995c85378bdcd76f3a62428c1d9857f0136d"
73
73
  }