aws-amplify 6.10.4-unstable.ec2ff53.0 → 6.11.1-unstable.0ecded1.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/dist/cjs/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.js +3 -3
- package/dist/cjs/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.js.map +1 -1
- package/dist/esm/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.d.ts +1 -1
- package/dist/esm/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.mjs +3 -3
- package/dist/esm/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.mjs.map +1 -1
- package/package.json +29 -29
- package/src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts +3 -3
package/dist/cjs/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.js
CHANGED
|
@@ -17,7 +17,7 @@ const ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
|
|
|
17
17
|
* @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.
|
|
18
18
|
* @returns An object that implements {@link KeyValueStorageInterface}.
|
|
19
19
|
*/
|
|
20
|
-
const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter,
|
|
20
|
+
const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {
|
|
21
21
|
return {
|
|
22
22
|
setItem(key, value) {
|
|
23
23
|
// Delete the cookie item first then set it. This results:
|
|
@@ -34,8 +34,8 @@ const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, val
|
|
|
34
34
|
async getItem(key) {
|
|
35
35
|
const cookie = cookieStorageAdapter.get(key);
|
|
36
36
|
const value = cookie?.value ?? null;
|
|
37
|
-
if (value &&
|
|
38
|
-
const isValid = await
|
|
37
|
+
if (value && validator?.getItem) {
|
|
38
|
+
const isValid = await validator.getItem(key, value);
|
|
39
39
|
if (!isValid)
|
|
40
40
|
return null;
|
|
41
41
|
}
|
package/dist/cjs/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createKeyValueStorageFromCookieStorageAdapter.js","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.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.createKeyValueStorageFromCookieStorageAdapter = exports.defaultSetCookieOptions = void 0;\nexports.defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nconst createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter,
|
|
1
|
+
{"version":3,"file":"createKeyValueStorageFromCookieStorageAdapter.js","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.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.createKeyValueStorageFromCookieStorageAdapter = exports.defaultSetCookieOptions = void 0;\nexports.defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nconst createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {\n return {\n setItem(key, value) {\n // Delete the cookie item first then set it. This results:\n // SetCookie: key=;expires=1970-01-01;(path='current-path') <- remove path'ed cookies\n // SetCookie: key=value;expires=Date.now() + 365 days;path=/;secure=true\n cookieStorageAdapter.delete(key);\n // TODO(HuiSF): follow up the default CookieSerializeOptions values\n cookieStorageAdapter.set(key, value, {\n ...exports.defaultSetCookieOptions,\n expires: new Date(Date.now() + ONE_YEAR_IN_MS),\n });\n return Promise.resolve();\n },\n async getItem(key) {\n const cookie = cookieStorageAdapter.get(key);\n const value = cookie?.value ?? null;\n if (value && validator?.getItem) {\n const isValid = await validator.getItem(key, value);\n if (!isValid)\n return null;\n }\n return value;\n },\n removeItem(key) {\n cookieStorageAdapter.delete(key);\n return Promise.resolve();\n },\n clear() {\n // TODO(HuiSF): follow up the implementation.\n throw new Error('This method has not implemented.');\n },\n };\n};\nexports.createKeyValueStorageFromCookieStorageAdapter = createKeyValueStorageFromCookieStorageAdapter;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,6CAA6C,GAAG,OAAO,CAAC,uBAAuB,GAAG,KAAK,CAAC,CAAC;AACjG,OAAO,CAAC,uBAAuB,GAAG;AAClC;AACA,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,IAAI,EAAE,GAAG;AACb,CAAC,CAAC;AACF,MAAM,cAAc,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6CAA6C,GAAG,CAAC,oBAAoB,EAAE,SAAS,KAAK;AAC3F,IAAI,OAAO;AACX,QAAQ,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE;AAC5B;AACA;AACA;AACA,YAAY,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7C;AACA,YAAY,oBAAoB,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE;AACjD,gBAAgB,GAAG,OAAO,CAAC,uBAAuB;AAClD,gBAAgB,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC;AAC9D,aAAa,CAAC,CAAC;AACf,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC,SAAS;AACT,QAAQ,MAAM,OAAO,CAAC,GAAG,EAAE;AAC3B,YAAY,MAAM,MAAM,GAAG,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC;AAChD,YAAY,IAAI,KAAK,IAAI,SAAS,EAAE,OAAO,EAAE;AAC7C,gBAAgB,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACpE,gBAAgB,IAAI,CAAC,OAAO;AAC5B,oBAAoB,OAAO,IAAI,CAAC;AAChC,aAAa;AACb,YAAY,OAAO,KAAK,CAAC;AACzB,SAAS;AACT,QAAQ,UAAU,CAAC,GAAG,EAAE;AACxB,YAAY,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC,SAAS;AACT,QAAQ,KAAK,GAAG;AAChB;AACA,YAAY,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAChE,SAAS;AACT,KAAK,CAAC;AACN,CAAC,CAAC;AACF,OAAO,CAAC,6CAA6C,GAAG,6CAA6C;;"}
|
package/dist/esm/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare const defaultSetCookieOptions: CookieStorage.SetCookieOptions;
|
|
|
7
7
|
* @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.
|
|
8
8
|
* @returns An object that implements {@link KeyValueStorageInterface}.
|
|
9
9
|
*/
|
|
10
|
-
export declare const createKeyValueStorageFromCookieStorageAdapter: (cookieStorageAdapter: CookieStorage.Adapter,
|
|
10
|
+
export declare const createKeyValueStorageFromCookieStorageAdapter: (cookieStorageAdapter: CookieStorage.Adapter, validator?: KeyValueStorageMethodValidator) => KeyValueStorageInterface;
|
package/dist/esm/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.mjs
CHANGED
|
@@ -13,7 +13,7 @@ const ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
|
|
|
13
13
|
* @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.
|
|
14
14
|
* @returns An object that implements {@link KeyValueStorageInterface}.
|
|
15
15
|
*/
|
|
16
|
-
const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter,
|
|
16
|
+
const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {
|
|
17
17
|
return {
|
|
18
18
|
setItem(key, value) {
|
|
19
19
|
// Delete the cookie item first then set it. This results:
|
|
@@ -30,8 +30,8 @@ const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, val
|
|
|
30
30
|
async getItem(key) {
|
|
31
31
|
const cookie = cookieStorageAdapter.get(key);
|
|
32
32
|
const value = cookie?.value ?? null;
|
|
33
|
-
if (value &&
|
|
34
|
-
const isValid = await
|
|
33
|
+
if (value && validator?.getItem) {
|
|
34
|
+
const isValid = await validator.getItem(key, value);
|
|
35
35
|
if (!isValid)
|
|
36
36
|
return null;
|
|
37
37
|
}
|
package/dist/esm/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createKeyValueStorageFromCookieStorageAdapter.mjs","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nexport const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter,
|
|
1
|
+
{"version":3,"file":"createKeyValueStorageFromCookieStorageAdapter.mjs","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nexport const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {\n return {\n setItem(key, value) {\n // Delete the cookie item first then set it. This results:\n // SetCookie: key=;expires=1970-01-01;(path='current-path') <- remove path'ed cookies\n // SetCookie: key=value;expires=Date.now() + 365 days;path=/;secure=true\n cookieStorageAdapter.delete(key);\n // TODO(HuiSF): follow up the default CookieSerializeOptions values\n cookieStorageAdapter.set(key, value, {\n ...defaultSetCookieOptions,\n expires: new Date(Date.now() + ONE_YEAR_IN_MS),\n });\n return Promise.resolve();\n },\n async getItem(key) {\n const cookie = cookieStorageAdapter.get(key);\n const value = cookie?.value ?? null;\n if (value && validator?.getItem) {\n const isValid = await validator.getItem(key, value);\n if (!isValid)\n return null;\n }\n return value;\n },\n removeItem(key) {\n cookieStorageAdapter.delete(key);\n return Promise.resolve();\n },\n clear() {\n // TODO(HuiSF): follow up the implementation.\n throw new Error('This method has not implemented.');\n },\n };\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,uBAAuB,GAAG;AACvC;AACA,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,IAAI,EAAE,GAAG;AACb,EAAE;AACF,MAAM,cAAc,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,6CAA6C,GAAG,CAAC,oBAAoB,EAAE,SAAS,KAAK;AAClG,IAAI,OAAO;AACX,QAAQ,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE;AAC5B;AACA;AACA;AACA,YAAY,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7C;AACA,YAAY,oBAAoB,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE;AACjD,gBAAgB,GAAG,uBAAuB;AAC1C,gBAAgB,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC;AAC9D,aAAa,CAAC,CAAC;AACf,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC,SAAS;AACT,QAAQ,MAAM,OAAO,CAAC,GAAG,EAAE;AAC3B,YAAY,MAAM,MAAM,GAAG,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC;AAChD,YAAY,IAAI,KAAK,IAAI,SAAS,EAAE,OAAO,EAAE;AAC7C,gBAAgB,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACpE,gBAAgB,IAAI,CAAC,OAAO;AAC5B,oBAAoB,OAAO,IAAI,CAAC;AAChC,aAAa;AACb,YAAY,OAAO,KAAK,CAAC;AACzB,SAAS;AACT,QAAQ,UAAU,CAAC,GAAG,EAAE;AACxB,YAAY,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC,SAAS;AACT,QAAQ,KAAK,GAAG;AAChB;AACA,YAAY,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAChE,SAAS;AACT,KAAK,CAAC;AACN;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aws-amplify",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.1-unstable.0ecded1.0+0ecded1",
|
|
4
4
|
"description": "AWS Amplify is a JavaScript library for Frontend and mobile developers building cloud-enabled applications.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -276,13 +276,13 @@
|
|
|
276
276
|
"utils"
|
|
277
277
|
],
|
|
278
278
|
"dependencies": {
|
|
279
|
-
"@aws-amplify/analytics": "7.0.
|
|
280
|
-
"@aws-amplify/api": "6.1.
|
|
281
|
-
"@aws-amplify/auth": "6.
|
|
282
|
-
"@aws-amplify/core": "6.
|
|
283
|
-
"@aws-amplify/datastore": "5.0.
|
|
284
|
-
"@aws-amplify/notifications": "2.0.
|
|
285
|
-
"@aws-amplify/storage": "6.7.
|
|
279
|
+
"@aws-amplify/analytics": "7.0.65-unstable.0ecded1.0+0ecded1",
|
|
280
|
+
"@aws-amplify/api": "6.1.10-unstable.0ecded1.0+0ecded1",
|
|
281
|
+
"@aws-amplify/auth": "6.9.1-unstable.0ecded1.0+0ecded1",
|
|
282
|
+
"@aws-amplify/core": "6.8.1-unstable.0ecded1.0+0ecded1",
|
|
283
|
+
"@aws-amplify/datastore": "5.0.67-unstable.0ecded1.0+0ecded1",
|
|
284
|
+
"@aws-amplify/notifications": "2.0.65-unstable.0ecded1.0+0ecded1",
|
|
285
|
+
"@aws-amplify/storage": "6.7.6-unstable.0ecded1.0+0ecded1",
|
|
286
286
|
"tslib": "^2.5.0"
|
|
287
287
|
},
|
|
288
288
|
"devDependencies": {
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"name": "[Analytics] record (Pinpoint)",
|
|
294
294
|
"path": "./dist/esm/analytics/index.mjs",
|
|
295
295
|
"import": "{ record }",
|
|
296
|
-
"limit": "17.
|
|
296
|
+
"limit": "17.63 kB"
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
299
|
"name": "[Analytics] record (Kinesis)",
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"name": "[Analytics] identifyUser (Pinpoint)",
|
|
318
318
|
"path": "./dist/esm/analytics/index.mjs",
|
|
319
319
|
"import": "{ identifyUser }",
|
|
320
|
-
"limit": "16.
|
|
320
|
+
"limit": "16.14 kB"
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
323
|
"name": "[Analytics] enable",
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
"name": "[API] generateClient (AppSync)",
|
|
336
336
|
"path": "./dist/esm/api/index.mjs",
|
|
337
337
|
"import": "{ generateClient }",
|
|
338
|
-
"limit": "44.
|
|
338
|
+
"limit": "44.26 kB"
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"name": "[API] REST API handlers",
|
|
@@ -353,13 +353,13 @@
|
|
|
353
353
|
"name": "[Auth] resetPassword (Cognito)",
|
|
354
354
|
"path": "./dist/esm/auth/index.mjs",
|
|
355
355
|
"import": "{ resetPassword }",
|
|
356
|
-
"limit": "12.
|
|
356
|
+
"limit": "12.71 kB"
|
|
357
357
|
},
|
|
358
358
|
{
|
|
359
359
|
"name": "[Auth] confirmResetPassword (Cognito)",
|
|
360
360
|
"path": "./dist/esm/auth/index.mjs",
|
|
361
361
|
"import": "{ confirmResetPassword }",
|
|
362
|
-
"limit": "12.
|
|
362
|
+
"limit": "12.66 kB"
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
"name": "[Auth] signIn (Cognito)",
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"name": "[Auth] resendSignUpCode (Cognito)",
|
|
372
372
|
"path": "./dist/esm/auth/index.mjs",
|
|
373
373
|
"import": "{ resendSignUpCode }",
|
|
374
|
-
"limit": "12.
|
|
374
|
+
"limit": "12.68 kB"
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
"name": "[Auth] confirmSignUp (Cognito)",
|
|
@@ -383,31 +383,31 @@
|
|
|
383
383
|
"name": "[Auth] confirmSignIn (Cognito)",
|
|
384
384
|
"path": "./dist/esm/auth/index.mjs",
|
|
385
385
|
"import": "{ confirmSignIn }",
|
|
386
|
-
"limit": "28.
|
|
386
|
+
"limit": "28.61 kB"
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
389
|
"name": "[Auth] updateMFAPreference (Cognito)",
|
|
390
390
|
"path": "./dist/esm/auth/index.mjs",
|
|
391
391
|
"import": "{ updateMFAPreference }",
|
|
392
|
-
"limit": "12.
|
|
392
|
+
"limit": "12.15 kB"
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
395
|
"name": "[Auth] fetchMFAPreference (Cognito)",
|
|
396
396
|
"path": "./dist/esm/auth/index.mjs",
|
|
397
397
|
"import": "{ fetchMFAPreference }",
|
|
398
|
-
"limit": "12.
|
|
398
|
+
"limit": "12.18 kB"
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
"name": "[Auth] verifyTOTPSetup (Cognito)",
|
|
402
402
|
"path": "./dist/esm/auth/index.mjs",
|
|
403
403
|
"import": "{ verifyTOTPSetup }",
|
|
404
|
-
"limit": "
|
|
404
|
+
"limit": "13.02 kB"
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
407
|
"name": "[Auth] updatePassword (Cognito)",
|
|
408
408
|
"path": "./dist/esm/auth/index.mjs",
|
|
409
409
|
"import": "{ updatePassword }",
|
|
410
|
-
"limit": "
|
|
410
|
+
"limit": "13.03 kB"
|
|
411
411
|
},
|
|
412
412
|
{
|
|
413
413
|
"name": "[Auth] setUpTOTP (Cognito)",
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
"name": "[Auth] updateUserAttributes (Cognito)",
|
|
420
420
|
"path": "./dist/esm/auth/index.mjs",
|
|
421
421
|
"import": "{ updateUserAttributes }",
|
|
422
|
-
"limit": "12.
|
|
422
|
+
"limit": "12.24 kB"
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
"name": "[Auth] getCurrentUser (Cognito)",
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
"name": "[Auth] confirmUserAttribute (Cognito)",
|
|
432
432
|
"path": "./dist/esm/auth/index.mjs",
|
|
433
433
|
"import": "{ confirmUserAttribute }",
|
|
434
|
-
"limit": "
|
|
434
|
+
"limit": "13.02 kB"
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
"name": "[Auth] signInWithRedirect (Cognito)",
|
|
@@ -443,13 +443,13 @@
|
|
|
443
443
|
"name": "[Auth] fetchUserAttributes (Cognito)",
|
|
444
444
|
"path": "./dist/esm/auth/index.mjs",
|
|
445
445
|
"import": "{ fetchUserAttributes }",
|
|
446
|
-
"limit": "12.
|
|
446
|
+
"limit": "12.07 kB"
|
|
447
447
|
},
|
|
448
448
|
{
|
|
449
449
|
"name": "[Auth] Basic Auth Flow (Cognito)",
|
|
450
450
|
"path": "./dist/esm/auth/index.mjs",
|
|
451
451
|
"import": "{ signIn, signOut, fetchAuthSession, confirmSignIn }",
|
|
452
|
-
"limit": "30.
|
|
452
|
+
"limit": "30.88 kB"
|
|
453
453
|
},
|
|
454
454
|
{
|
|
455
455
|
"name": "[Auth] OAuth Auth Flow (Cognito)",
|
|
@@ -461,19 +461,19 @@
|
|
|
461
461
|
"name": "[Auth] Associate WebAuthN Credential (Cognito)",
|
|
462
462
|
"path": "./dist/esm/auth/index.mjs",
|
|
463
463
|
"import": "{ associateWebAuthnCredential }",
|
|
464
|
-
"limit": "13.
|
|
464
|
+
"limit": "13.59 kB"
|
|
465
465
|
},
|
|
466
466
|
{
|
|
467
467
|
"name": "[Auth] List WebAuthN Credentials (Cognito)",
|
|
468
468
|
"path": "./dist/esm/auth/index.mjs",
|
|
469
469
|
"import": "{ listWebAuthnCredentials }",
|
|
470
|
-
"limit": "12.
|
|
470
|
+
"limit": "12.18 kB"
|
|
471
471
|
},
|
|
472
472
|
{
|
|
473
473
|
"name": "[Auth] Delete WebAuthN Credential (Cognito)",
|
|
474
474
|
"path": "./dist/esm/auth/index.mjs",
|
|
475
475
|
"import": "{ deleteWebAuthnCredential }",
|
|
476
|
-
"limit": "12.
|
|
476
|
+
"limit": "12.04 kB"
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
479
|
"name": "[Storage] copy (S3)",
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
"name": "[Storage] list (S3)",
|
|
504
504
|
"path": "./dist/esm/storage/index.mjs",
|
|
505
505
|
"import": "{ list }",
|
|
506
|
-
"limit": "16.
|
|
506
|
+
"limit": "16.77 kB"
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
"name": "[Storage] remove (S3)",
|
|
@@ -515,8 +515,8 @@
|
|
|
515
515
|
"name": "[Storage] uploadData (S3)",
|
|
516
516
|
"path": "./dist/esm/storage/index.mjs",
|
|
517
517
|
"import": "{ uploadData }",
|
|
518
|
-
"limit": "22.
|
|
518
|
+
"limit": "22.87 kB"
|
|
519
519
|
}
|
|
520
520
|
],
|
|
521
|
-
"gitHead": "
|
|
521
|
+
"gitHead": "0ecded15a4d1318fe10b16dbe534a111a12bdc21"
|
|
522
522
|
}
|
|
@@ -23,7 +23,7 @@ const ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
|
|
|
23
23
|
*/
|
|
24
24
|
export const createKeyValueStorageFromCookieStorageAdapter = (
|
|
25
25
|
cookieStorageAdapter: CookieStorage.Adapter,
|
|
26
|
-
|
|
26
|
+
validator?: KeyValueStorageMethodValidator,
|
|
27
27
|
): KeyValueStorageInterface => {
|
|
28
28
|
return {
|
|
29
29
|
setItem(key, value) {
|
|
@@ -44,8 +44,8 @@ export const createKeyValueStorageFromCookieStorageAdapter = (
|
|
|
44
44
|
const cookie = cookieStorageAdapter.get(key);
|
|
45
45
|
const value = cookie?.value ?? null;
|
|
46
46
|
|
|
47
|
-
if (value &&
|
|
48
|
-
const isValid = await
|
|
47
|
+
if (value && validator?.getItem) {
|
|
48
|
+
const isValid = await validator.getItem(key, value);
|
|
49
49
|
if (!isValid) return null;
|
|
50
50
|
}
|
|
51
51
|
|