@aws-amplify/auth 4.5.8 → 4.5.9-unstable.4
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/dist/aws-amplify-auth.js +4 -4
- package/dist/aws-amplify-auth.js.map +1 -1
- package/dist/aws-amplify-auth.min.js +1 -1
- package/dist/aws-amplify-auth.min.js.map +1 -1
- package/lib/Auth.js +2 -2
- package/lib/Auth.js.map +1 -1
- package/lib/urlListener.js +2 -2
- package/lib/urlListener.js.map +1 -1
- package/lib-esm/Auth.js +3 -3
- package/lib-esm/Auth.js.map +1 -1
- package/lib-esm/urlListener.js +3 -3
- package/lib-esm/urlListener.js.map +1 -1
- package/package.json +5 -5
- package/src/Auth.ts +3 -3
- package/src/urlListener.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/auth",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.9-unstable.4+3dd903573",
|
|
4
4
|
"description": "Auth category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://aws-amplify.github.io/",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@aws-amplify/cache": "4.0.
|
|
45
|
-
"@aws-amplify/core": "4.5.
|
|
46
|
-
"amazon-cognito-identity-js": "5.2.
|
|
44
|
+
"@aws-amplify/cache": "4.0.47-unstable.4+3dd903573",
|
|
45
|
+
"@aws-amplify/core": "4.5.9-unstable.4+3dd903573",
|
|
46
|
+
"amazon-cognito-identity-js": "5.2.10-unstable.38+3dd903573",
|
|
47
47
|
"crypto-js": "^4.1.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
],
|
|
96
96
|
"testSequencer": "./testSequencer.js"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "3dd903573843f6f53251d118a11de7dacd9edddd"
|
|
99
99
|
}
|
package/src/Auth.ts
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
StorageHelper,
|
|
42
42
|
ICredentials,
|
|
43
43
|
Parser,
|
|
44
|
-
|
|
44
|
+
browserOrNode,
|
|
45
45
|
UniversalStorage,
|
|
46
46
|
urlSafeDecode,
|
|
47
47
|
} from '@aws-amplify/core';
|
|
@@ -1905,7 +1905,7 @@ export class AuthClass {
|
|
|
1905
1905
|
resolve: () => void,
|
|
1906
1906
|
reject: (reason?: any) => void
|
|
1907
1907
|
) {
|
|
1908
|
-
const { isBrowser } =
|
|
1908
|
+
const { isBrowser } = browserOrNode();
|
|
1909
1909
|
|
|
1910
1910
|
if (isBrowser) {
|
|
1911
1911
|
this.oAuthSignOutRedirectOrReject(reject);
|
|
@@ -2273,7 +2273,7 @@ export class AuthClass {
|
|
|
2273
2273
|
);
|
|
2274
2274
|
|
|
2275
2275
|
const currentUrl =
|
|
2276
|
-
URL || (
|
|
2276
|
+
URL || (browserOrNode().isBrowser ? window.location.href : '');
|
|
2277
2277
|
|
|
2278
2278
|
const hasCodeOrError = !!(parse(currentUrl).query || '')
|
|
2279
2279
|
.split('&')
|
package/src/urlListener.ts
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
11
|
* and limitations under the License.
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import { browserOrNode } from '@aws-amplify/core';
|
|
14
14
|
|
|
15
15
|
export default callback => {
|
|
16
|
-
if (
|
|
16
|
+
if (browserOrNode().isBrowser && window.location) {
|
|
17
17
|
const url = window.location.href;
|
|
18
18
|
|
|
19
19
|
callback({ url });
|
|
20
|
-
} else if (
|
|
20
|
+
} else if (browserOrNode().isNode) {
|
|
21
21
|
// continue building on ssr
|
|
22
22
|
() => {}; // noop
|
|
23
23
|
} else {
|