UNPKG

@aws-amplify/core

Version:
1 lines 1.15 kB
{"version":3,"file":"fetchAuthSession.mjs","sources":["../../../../src/singleton/apis/fetchAuthSession.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '../Amplify';\nimport { fetchAuthSession as fetchAuthSessionInternal } from './internal/fetchAuthSession';\n/**\n * Fetch the auth session including the tokens and credentials if they are available. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n * @throws {@link AuthError} - Throws error when session information cannot be refreshed.\n * @returns Promise<AuthSession>\n */\nexport const fetchAuthSession = (options) => {\n return fetchAuthSessionInternal(Amplify, options);\n};\n"],"names":["fetchAuthSessionInternal"],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,gBAAgB,GAAG,CAAC,OAAO,KAAK;AAC7C,IAAI,OAAOA,kBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtD;;;;"}