UNPKG

aws-amplify

Version:

AWS Amplify is a JavaScript library for Frontend and mobile developers building cloud-enabled applications.

1 lines 1.31 kB
{"version":3,"file":"createAWSCredentialsAndIdentityIdProvider.mjs","sources":["../../../../../src/adapter-core/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CognitoAWSCredentialsAndIdentityIdProvider, DefaultIdentityIdStore, } from '@aws-amplify/auth/cognito';\n/**\n * Creates a instance of {@link CognitoAWSCredentialsAndIdentityIdProvider} using\n * the provided `keyValueStorage`.\n * @param authConfig The Auth config that the credentials provider needs to function.\n * @param keyValueStorage An object that implements the {@link KeyValueStorageInterface}.\n * @returns An instance of {@link CognitoAWSCredentialsAndIdentityIdProvider}.\n */\nexport const createAWSCredentialsAndIdentityIdProvider = (authConfig, keyValueStorage) => {\n const credentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider(new DefaultIdentityIdStore(keyValueStorage));\n return credentialsProvider;\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,yCAAyC,GAAG,CAAC,UAAU,EAAE,eAAe,KAAK;AAC1F,IAAI,MAAM,mBAAmB,GAAG,IAAI,0CAA0C,CAAC,IAAI,sBAAsB,CAAC,eAAe,CAAC,CAAC;AAC3H,IAAI,OAAO,mBAAmB;AAC9B;;;;"}