@aws-amplify/analytics
Version:
Analytics category of aws-amplify
1 lines • 934 B
Source Map (JSON)
{"version":3,"file":"resolveCredentials.mjs","sources":["../../../../../src/providers/pinpoint/utils/resolveCredentials.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fetchAuthSession } from '@aws-amplify/core';\nimport { AnalyticsValidationErrorCode, assertValidationError, } from '../../../errors';\n/**\n * @internal\n */\nexport const resolveCredentials = async () => {\n const { credentials, identityId } = await fetchAuthSession();\n assertValidationError(!!credentials, AnalyticsValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,YAAY;AAC9C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,gBAAgB,EAAE;AAChE,IAAI,qBAAqB,CAAC,CAAC,CAAC,WAAW,EAAE,4BAA4B,CAAC,aAAa,CAAC;AACpF,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE;AACtC;;;;"}