@aws-amplify/core
Version:
Core category of aws-amplify
12 lines (11 loc) • 618 B
TypeScript
import { AuthSession, FetchAuthSessionOptions } from '../Auth/types';
/**
* Fetch the auth session including the tokens and credentials if they are available. By default it
* does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh
* with `{ forceRefresh: true }` input.
*
* @param options - Options configuring the fetch behavior.
* @throws {@link AuthError} - Throws error when session information cannot be refreshed.
* @returns Promise<AuthSession>
*/
export declare const fetchAuthSession: (options?: FetchAuthSessionOptions) => Promise<AuthSession>;