@aws-amplify/core 6.3.11-unstable.7c1ed91.0 → 6.3.11
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/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/singleton/Auth/utils/index.js +0 -6
- package/dist/cjs/singleton/Auth/utils/index.js.map +1 -1
- package/dist/cjs/singleton/apis/fetchAuthSession.js +0 -9
- package/dist/cjs/singleton/apis/fetchAuthSession.js.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/singleton/Auth/utils/index.d.ts +0 -6
- package/dist/esm/singleton/Auth/utils/index.mjs +0 -6
- package/dist/esm/singleton/Auth/utils/index.mjs.map +1 -1
- package/dist/esm/singleton/apis/fetchAuthSession.d.ts +0 -9
- package/dist/esm/singleton/apis/fetchAuthSession.mjs +0 -9
- package/dist/esm/singleton/apis/fetchAuthSession.mjs.map +1 -1
- package/package.json +3 -3
- package/src/Platform/version.ts +1 -1
- package/src/singleton/Auth/utils/index.ts +0 -6
- package/src/singleton/apis/fetchAuthSession.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.5.2
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.5.2';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,OAAO;;"}
|
|
@@ -31,12 +31,6 @@ function assertIdentityPoolIdConfig(cognitoConfig) {
|
|
|
31
31
|
(0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);
|
|
32
32
|
}
|
|
33
33
|
exports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;
|
|
34
|
-
/**
|
|
35
|
-
* Decodes payload of JWT token
|
|
36
|
-
*
|
|
37
|
-
* @param {String} token A string representing a token to be decoded
|
|
38
|
-
* @throws {@link Error} - Throws error when token is invalid or payload malformed.
|
|
39
|
-
*/
|
|
40
34
|
function decodeJWT(token) {
|
|
41
35
|
const tokenParts = token.split('.');
|
|
42
36
|
if (tokenParts.length !== 3) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeJWT = exports.assertIdentityPoolIdConfig = exports.assertOAuthConfig = exports.assertTokenProviderConfig = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convert_1 = require(\"../../../utils/convert\");\nconst errorHelpers_1 = require(\"./errorHelpers\");\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n (0, errorHelpers_1.assert)(assertionValid, errorHelpers_1.AuthConfigurationErrorCode.AuthUserPoolException);\n}\nexports.assertTokenProviderConfig = assertTokenProviderConfig;\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n (0, errorHelpers_1.assert)(validOAuthConfig, errorHelpers_1.AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nexports.assertOAuthConfig = assertOAuthConfig;\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n (0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\nexports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeJWT = exports.assertIdentityPoolIdConfig = exports.assertOAuthConfig = exports.assertTokenProviderConfig = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convert_1 = require(\"../../../utils/convert\");\nconst errorHelpers_1 = require(\"./errorHelpers\");\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n (0, errorHelpers_1.assert)(assertionValid, errorHelpers_1.AuthConfigurationErrorCode.AuthUserPoolException);\n}\nexports.assertTokenProviderConfig = assertTokenProviderConfig;\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n (0, errorHelpers_1.assert)(validOAuthConfig, errorHelpers_1.AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nexports.assertOAuthConfig = assertOAuthConfig;\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n (0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\nexports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;\nfunction decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(convert_1.base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\nexports.decodeJWT = decodeJWT;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,yBAAyB,GAAG,KAAK,CAAC,CAAC;AAChI;AACA;AACA,MAAM,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACpD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD,SAAS,yBAAyB,CAAC,aAAa,EAAE;AAClD,IAAI,IAAI,cAAc,GAAG,IAAI,CAAC;AAC9B,IAAI,IAAI,CAAC,aAAa,EAAE;AACxB,QAAQ,cAAc,GAAG,KAAK,CAAC;AAC/B,KAAK;AACL,SAAS;AACT,QAAQ,cAAc;AACtB,YAAY,CAAC,CAAC,aAAa,CAAC,UAAU,IAAI,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC;AAC3E,KAA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;AAChD,QAAQ,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC/E,QAAQ,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,aAAa;AAClE,aAAa,OAAO,CAAC,MAAM,CAAC;AAC5B,aAAa,KAAK,CAAC,EAAE,CAAC;AACtB,aAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,aAAa,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5C,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,MAAM,KAAK;AACjC,YAAY,OAAO;AACnB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;AACjD,KAAK;AACL,CAAC;AACD,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
|
|
@@ -6,15 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.fetchAuthSession = void 0;
|
|
7
7
|
const Amplify_1 = require("../Amplify");
|
|
8
8
|
const fetchAuthSession_1 = require("./internal/fetchAuthSession");
|
|
9
|
-
/**
|
|
10
|
-
* Fetch the auth session including the tokens and credentials if they are available. By default it
|
|
11
|
-
* does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh
|
|
12
|
-
* with `{ forceRefresh: true }` input.
|
|
13
|
-
*
|
|
14
|
-
* @param options - Options configuring the fetch behavior.
|
|
15
|
-
* @throws {@link AuthError} - Throws error when session information cannot be refreshed.
|
|
16
|
-
* @returns Promise<AuthSession>
|
|
17
|
-
*/
|
|
18
9
|
const fetchAuthSession = (options) => {
|
|
19
10
|
return (0, fetchAuthSession_1.fetchAuthSession)(Amplify_1.Amplify, options);
|
|
20
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAuthSession.js","sources":["../../../../src/singleton/apis/fetchAuthSession.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAuthSession = void 0;\nconst Amplify_1 = require(\"../Amplify\");\nconst fetchAuthSession_1 = require(\"./internal/fetchAuthSession\");\
|
|
1
|
+
{"version":3,"file":"fetchAuthSession.js","sources":["../../../../src/singleton/apis/fetchAuthSession.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAuthSession = void 0;\nconst Amplify_1 = require(\"../Amplify\");\nconst fetchAuthSession_1 = require(\"./internal/fetchAuthSession\");\nconst fetchAuthSession = (options) => {\n return (0, fetchAuthSession_1.fetchAuthSession)(Amplify_1.Amplify, options);\n};\nexports.fetchAuthSession = fetchAuthSession;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACxC,MAAM,kBAAkB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAClE,MAAM,gBAAgB,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,OAAO,IAAI,kBAAkB,CAAC,gBAAgB,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAChF,CAAC,CAAC;AACF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.5.2
|
|
1
|
+
export declare const version = "6.5.2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.5.2
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.5.2';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -7,10 +7,4 @@ export declare function assertOAuthConfig(cognitoConfig?: AuthConfig['Cognito'])
|
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
export declare function assertIdentityPoolIdConfig(cognitoConfig?: StrictUnion<CognitoUserPoolConfig | CognitoUserPoolAndIdentityPoolConfig | CognitoIdentityPoolConfig>): asserts cognitoConfig is CognitoIdentityPoolConfig;
|
|
10
|
-
/**
|
|
11
|
-
* Decodes payload of JWT token
|
|
12
|
-
*
|
|
13
|
-
* @param {String} token A string representing a token to be decoded
|
|
14
|
-
* @throws {@link Error} - Throws error when token is invalid or payload malformed.
|
|
15
|
-
*/
|
|
16
10
|
export declare function decodeJWT(token: string): JWT;
|
|
@@ -27,12 +27,6 @@ function assertIdentityPoolIdConfig(cognitoConfig) {
|
|
|
27
27
|
const validConfig = !!cognitoConfig?.identityPoolId;
|
|
28
28
|
assert(validConfig, AuthConfigurationErrorCode.InvalidIdentityPoolIdException);
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Decodes payload of JWT token
|
|
32
|
-
*
|
|
33
|
-
* @param {String} token A string representing a token to be decoded
|
|
34
|
-
* @throws {@link Error} - Throws error when token is invalid or payload malformed.
|
|
35
|
-
*/
|
|
36
30
|
function decodeJWT(token) {
|
|
37
31
|
const tokenParts = token.split('.');
|
|
38
32
|
if (tokenParts.length !== 3) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { base64Decoder } from '../../../utils/convert';\nimport { AuthConfigurationErrorCode, assert } from './errorHelpers';\nexport function assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n assert(assertionValid, AuthConfigurationErrorCode.AuthUserPoolException);\n}\nexport function assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n assert(validOAuthConfig, AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nexport function assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n assert(validConfig, AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { base64Decoder } from '../../../utils/convert';\nimport { AuthConfigurationErrorCode, assert } from './errorHelpers';\nexport function assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n assert(assertionValid, AuthConfigurationErrorCode.AuthUserPoolException);\n}\nexport function assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n assert(validOAuthConfig, AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nexport function assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n assert(validConfig, AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\nexport function decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAGO,SAAS,yBAAyB,CAAC,aAAa,EAAE;AACzD,IAAI,IAAI,cAAc,GAAG,IAAI,CAAC;AAC9B,IAAI,IAAI,CAAC,aAAa,EAAE;AACxB,QAAQ,cAAc,GAAG,KAAK,CAAC;AAC/B,KAAK;AACL,SAAS;AACT,QAAQ,cAAc;AACtB,YAAY,CAAC,CAAC,aAAa,CAAC,UAAU,IAAI,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC;AAC3E,KAAK;AACL,IAAI,MAAM,CAAC,cAAc,EAAE,0BAA0B,CAAC,qBAAqB,CAAC,CAAC;AAC7E,CAAC;AACM,SAAS,iBAAiB,CAAC,aAAa,EAAE;AACjD,IAAI,MAAM,gBAAgB,G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,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,aAAa,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5C,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,MAAM,KAAK;AACjC,YAAY,OAAO;AACnB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;AACjD,KAAK;AACL;;;;"}
|
|
@@ -1,11 +1,2 @@
|
|
|
1
1
|
import { AuthSession, FetchAuthSessionOptions } from '../Auth/types';
|
|
2
|
-
/**
|
|
3
|
-
* Fetch the auth session including the tokens and credentials if they are available. By default it
|
|
4
|
-
* does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh
|
|
5
|
-
* with `{ forceRefresh: true }` input.
|
|
6
|
-
*
|
|
7
|
-
* @param options - Options configuring the fetch behavior.
|
|
8
|
-
* @throws {@link AuthError} - Throws error when session information cannot be refreshed.
|
|
9
|
-
* @returns Promise<AuthSession>
|
|
10
|
-
*/
|
|
11
2
|
export declare const fetchAuthSession: (options?: FetchAuthSessionOptions) => Promise<AuthSession>;
|
|
@@ -3,15 +3,6 @@ import { fetchAuthSession as fetchAuthSession$1 } from './internal/fetchAuthSess
|
|
|
3
3
|
|
|
4
4
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
/**
|
|
7
|
-
* Fetch the auth session including the tokens and credentials if they are available. By default it
|
|
8
|
-
* does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh
|
|
9
|
-
* with `{ forceRefresh: true }` input.
|
|
10
|
-
*
|
|
11
|
-
* @param options - Options configuring the fetch behavior.
|
|
12
|
-
* @throws {@link AuthError} - Throws error when session information cannot be refreshed.
|
|
13
|
-
* @returns Promise<AuthSession>
|
|
14
|
-
*/
|
|
15
6
|
const fetchAuthSession = (options) => {
|
|
16
7
|
return fetchAuthSession$1(Amplify, options);
|
|
17
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAuthSession.mjs","sources":["../../../../src/singleton/apis/fetchAuthSession.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '../Amplify';\nimport { fetchAuthSession as fetchAuthSessionInternal } from './internal/fetchAuthSession';\
|
|
1
|
+
{"version":3,"file":"fetchAuthSession.mjs","sources":["../../../../src/singleton/apis/fetchAuthSession.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '../Amplify';\nimport { fetchAuthSession as fetchAuthSessionInternal } from './internal/fetchAuthSession';\nexport const fetchAuthSession = (options) => {\n return fetchAuthSessionInternal(Amplify, options);\n};\n"],"names":["fetchAuthSessionInternal"],"mappings":";;;AAAA;AACA;AAGY,MAAC,gBAAgB,GAAG,CAAC,OAAO,KAAK;AAC7C,IAAI,OAAOA,kBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.3.11
|
|
3
|
+
"version": "6.3.11",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"uuid": "^9.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@aws-amplify/react-native": "1.1.
|
|
63
|
+
"@aws-amplify/react-native": "1.1.4",
|
|
64
64
|
"@types/js-cookie": "3.0.2",
|
|
65
65
|
"genversion": "^2.2.0",
|
|
66
66
|
"typescript": "5.0.2"
|
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "733c3bd722f06b87f674736cc3f997d6ba5addda"
|
|
196
196
|
}
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.5.2
|
|
2
|
+
export const version = '6.5.2';
|
|
@@ -66,12 +66,6 @@ export function assertIdentityPoolIdConfig(
|
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
/**
|
|
70
|
-
* Decodes payload of JWT token
|
|
71
|
-
*
|
|
72
|
-
* @param {String} token A string representing a token to be decoded
|
|
73
|
-
* @throws {@link Error} - Throws error when token is invalid or payload malformed.
|
|
74
|
-
*/
|
|
75
69
|
export function decodeJWT(token: string): JWT {
|
|
76
70
|
const tokenParts = token.split('.');
|
|
77
71
|
|
|
@@ -6,15 +6,6 @@ import { AuthSession, FetchAuthSessionOptions } from '../Auth/types';
|
|
|
6
6
|
|
|
7
7
|
import { fetchAuthSession as fetchAuthSessionInternal } from './internal/fetchAuthSession';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Fetch the auth session including the tokens and credentials if they are available. By default it
|
|
11
|
-
* does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh
|
|
12
|
-
* with `{ forceRefresh: true }` input.
|
|
13
|
-
*
|
|
14
|
-
* @param options - Options configuring the fetch behavior.
|
|
15
|
-
* @throws {@link AuthError} - Throws error when session information cannot be refreshed.
|
|
16
|
-
* @returns Promise<AuthSession>
|
|
17
|
-
*/
|
|
18
9
|
export const fetchAuthSession = (
|
|
19
10
|
options?: FetchAuthSessionOptions,
|
|
20
11
|
): Promise<AuthSession> => {
|