UNPKG

618 BTypeScriptView Raw
1import { AuthSession, FetchAuthSessionOptions } from '../Auth/types';
2/**
3 * Fetch the auth session including the tokens and credentials if they are available. By default it
4 * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh
5 * with `{ forceRefresh: true }` input.
6 *
7 * @param options - Options configuring the fetch behavior.
8 * @throws {@link AuthError} - Throws error when session information cannot be refreshed.
9 * @returns Promise<AuthSession>
10 */
11export declare const fetchAuthSession: (options?: FetchAuthSessionOptions) => Promise<AuthSession>;