UNPKG

@aws-amplify/auth

Version:
1 lines 982 B
{"version":3,"file":"getCurrentUser.mjs","sources":["../../../../../src/providers/cognito/apis/getCurrentUser.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { getCurrentUser as getCurrentUserInternal } from './internal/getCurrentUser';\n/**\n * Gets the current user from the idToken.\n *\n * @param input - The GetCurrentUserInput object.\n * @returns GetCurrentUserOutput\n * @throws - {@link InitiateAuthException} - Thrown when the service fails to refresh the tokens.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nexport const getCurrentUser = async () => {\n return getCurrentUserInternal(Amplify);\n};\n"],"names":["getCurrentUserInternal"],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,YAAY;AAC1C,IAAI,OAAOA,gBAAsB,CAAC,OAAO,CAAC;AAC1C;;;;"}