UNPKG

@aws-amplify/auth

Version:

Auth category of aws-amplify

13 lines (12 loc) • 590 B
import { AmplifyContext } from '@aws-amplify/core'; import { GetCurrentUserOutput } from '../types'; export declare function getCurrentUser(ctx: AmplifyContext): Promise<GetCurrentUserOutput>; /** * Gets the current user from the idToken. * * @param input - The GetCurrentUserInput object. * @returns GetCurrentUserOutput * @throws - {@link InitiateAuthException} - Thrown when the service fails to refresh the tokens. * @throws AuthTokenConfigException - Thrown when the token provider config is invalid. */ export declare function getCurrentUser(): Promise<GetCurrentUserOutput>;