@aws-amplify/rtn-web-browser 1.0.16 → 1.0.17-unstable.0d2aa5d.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/rtn-web-browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17-unstable.0d2aa5d.0+0d2aa5d",
|
|
4
4
|
"description": "React Native module for aws-amplify web browser",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"dist/esm",
|
|
46
46
|
"src"
|
|
47
47
|
],
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "0d2aa5d71a6b995e302c7404becd8345763eae43"
|
|
49
49
|
}
|
|
@@ -15,7 +15,7 @@ let redirectListener: NativeEventSubscription | undefined;
|
|
|
15
15
|
export const openAuthSessionAsync = async (
|
|
16
16
|
url: string,
|
|
17
17
|
redirectUrls: string[],
|
|
18
|
-
prefersEphemeralSession?: boolean
|
|
18
|
+
prefersEphemeralSession?: boolean,
|
|
19
19
|
) => {
|
|
20
20
|
// enforce HTTPS
|
|
21
21
|
const httpsUrl = url.replace('http://', 'https://');
|
|
@@ -31,16 +31,16 @@ export const openAuthSessionAsync = async (
|
|
|
31
31
|
const openAuthSessionIOS = async (
|
|
32
32
|
url: string,
|
|
33
33
|
redirectUrls: string[],
|
|
34
|
-
prefersEphemeralSession: boolean = false
|
|
34
|
+
prefersEphemeralSession: boolean = false,
|
|
35
35
|
) => {
|
|
36
36
|
const redirectUrl = redirectUrls.find(
|
|
37
37
|
// take the first non-web url as the deeplink
|
|
38
|
-
item => !item.startsWith('https://') && !item.startsWith('http://')
|
|
38
|
+
item => !item.startsWith('https://') && !item.startsWith('http://'),
|
|
39
39
|
);
|
|
40
40
|
return nativeModule.openAuthSessionAsync(
|
|
41
41
|
url,
|
|
42
42
|
redirectUrl,
|
|
43
|
-
prefersEphemeralSession
|
|
43
|
+
prefersEphemeralSession,
|
|
44
44
|
);
|
|
45
45
|
};
|
|
46
46
|
|
package/src/nativeModule.ts
CHANGED
package/src/types/native.ts
CHANGED