@aws-amplify/auth
Version:
Auth category of aws-amplify
22 lines (20 loc) • 841 B
JavaScript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCurrentUser = void 0;
const core_1 = require("@aws-amplify/core");
const getCurrentUser_1 = require("./internal/getCurrentUser");
/**
* 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.
*/
const getCurrentUser = async () => {
return (0, getCurrentUser_1.getCurrentUser)(core_1.Amplify);
};
exports.getCurrentUser = getCurrentUser;
//# sourceMappingURL=getCurrentUser.js.map
;