UNPKG

@aws-amplify/analytics

Version:

Analytics category of aws-amplify

16 lines (14 loc) 675 B
'use strict'; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveCredentials = void 0; const core_1 = require("@aws-amplify/core"); const errors_1 = require("../errors"); const resolveCredentials = async () => { const { credentials, identityId } = await (0, core_1.fetchAuthSession)(); (0, errors_1.assertValidationError)(!!credentials, errors_1.AnalyticsValidationErrorCode.NoCredentials); return { credentials, identityId }; }; exports.resolveCredentials = resolveCredentials; //# sourceMappingURL=resolveCredentials.js.map