diff --git a/packages/auth/src/index.ts b/packages/auth/src/index.ts index cd9c90280a0..799492edb39 100644 --- a/packages/auth/src/index.ts +++ b/packages/auth/src/index.ts @@ -77,6 +77,8 @@ export { AuthError } from './errors/AuthError'; export { fetchAuthSession, + FetchAuthSessionOptions, + AuthSession, decodeJWT, CredentialsAndIdentityIdProvider, GetCredentialsOptions, diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 05c753c7e6b..f17968928c6 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -13,6 +13,7 @@ export { TokenProvider, AuthTokens, FetchAuthSessionOptions, + AuthSession, CredentialsAndIdentityIdProvider, CredentialsAndIdentityId, Identity, diff --git a/packages/core/src/singleton/apis/fetchAuthSession.ts b/packages/core/src/singleton/apis/fetchAuthSession.ts index 858edcd1cd9..f7e1248ae54 100644 --- a/packages/core/src/singleton/apis/fetchAuthSession.ts +++ b/packages/core/src/singleton/apis/fetchAuthSession.ts @@ -2,10 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import { Amplify } from '../Amplify'; -import { FetchAuthSessionOptions } from '../Auth/types'; +import { AuthSession, FetchAuthSessionOptions } from '../Auth/types'; import { fetchAuthSession as fetchAuthSessionInternal } from './internal/fetchAuthSession'; -export const fetchAuthSession = (options?: FetchAuthSessionOptions) => { +export const fetchAuthSession = ( + options?: FetchAuthSessionOptions, +): Promise => { return fetchAuthSessionInternal(Amplify, options); };